aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordrillsar <travelagloo.com>2017-07-11 20:59:13 -0400
committerAndreas Schuh <andreas.schuh.84@gmail.com>2018-09-28 14:49:19 +0100
commit6e536553ef3d15c9657e6315b24120fcbe1d5f00 (patch)
treedf6c0a3aae5e577fc44a48e8781a2ec7c665a75e
parentcad38c919c73c4d6622cdcebcd675627e2183022 (diff)
downloadgflags-6e536553ef3d15c9657e6315b24120fcbe1d5f00.tar.gz
Fix V728 excessive check
-rw-r--r--src/gflags.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gflags.cc b/src/gflags.cc
index 9869782..504b722 100644
--- a/src/gflags.cc
+++ b/src/gflags.cc
@@ -1036,8 +1036,7 @@ uint32 CommandLineFlagParser::ParseNewCommandLineFlags(int* argc, char*** argv,
char* arg = (*argv)[i];
// Like getopt(), we permute non-option flags to be at the end.
- if (arg[0] != '-' || // must be a program argument
- (arg[0] == '-' && arg[1] == '\0')) { // "-" is an argument, not a flag
+ if (arg[0] != '-' || arg[1] == '\0') { // must be a program argument "-" is an argument, not a flag
memmove((*argv) + i, (*argv) + i+1, (*argc - (i+1)) * sizeof((*argv)[i]));
(*argv)[*argc-1] = arg; // we go last
first_nonopt--; // we've been pushed onto the stack