xentrace: undeadify invalid option argument handling
authorMatthew Daley <mattjd@gmail.com>
Wed, 30 Oct 2013 07:52:05 +0000 (20:52 +1300)
committerIan Campbell <ian.campbell@citrix.com>
Thu, 31 Oct 2013 21:55:53 +0000 (21:55 +0000)
Apparently it's always been like this.

Coverity-ID: 1056153
Signed-off-by: Matthew Daley <mattjd@gmail.com>
Reviewed-by: George Dunlap <george.dunlap@eu.citrix.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: Ian Campbell <ian.campbell@citrix.com>
tools/xentrace/xentrace.c

index 504763d09fdb485b85e75da374692d8ccfe59bb0..8a38e3268a9cc841baae0972017cc81f3cc0d057 100644 (file)
@@ -858,10 +858,11 @@ long sargtol(const char *restrict arg, int base)
 
 
     return val;
+
 invalid:
-    return 0;
     fprintf(stderr, "Invalid option argument: %s\n\n", arg);
     usage();
+    return 0; /* not actually reached */
 }
 
 /* convert the argument string pointed to by arg to a long int representation */