diff mbox series

[1/2] rt-tests: hackbench: removed extra use of optind

Message ID 20240521202940.242048-1-ashelat@redhat.com
State Superseded
Headers show
Series [1/2] rt-tests: hackbench: removed extra use of optind | expand

Commit Message

Anubhav Shelat May 21, 2024, 8:29 p.m. UTC
Commit 778a02b7c519 forgot to drop a use of optind when processing option 's' which was fixed in this commit.

Signed-off-by: Anubhav Shelat <ashelat@redhat.com>
---
 src/hackbench/hackbench.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/src/hackbench/hackbench.c b/src/hackbench/hackbench.c
index d4924b3cc129..fec8357bef81 100644
--- a/src/hackbench/hackbench.c
+++ b/src/hackbench/hackbench.c
@@ -456,7 +456,7 @@  static void process_options(int argc, char *argv[])
 			use_inet = 1;
 			break;
 		case 's':
-			if (!(argv[optind] && (datasize = atoi(optarg)) > 0)) {
+			if ((datasize = atoi(optarg)) <= 0) {
 				fprintf(stderr, "%s: --datasize|-s requires an integer > 0\n", argv[0]);
 				print_usage_exit(1);
 			}