From: Matthew Fernandez Date: Sat, 19 Mar 2022 17:45:02 +0000 (-0700) Subject: gvParseArgs etc: use a clearer idiom for accessing characters of 'arg' X-Git-Tag: 4.0.0~163^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=68d75719cd94598dc37306a6444672fdea8ebd58;p=graphviz gvParseArgs etc: use a clearer idiom for accessing characters of 'arg' --- diff --git a/lib/common/args.c b/lib/common/args.c index dff892498..6dccd0374 100644 --- a/lib/common/args.c +++ b/lib/common/args.c @@ -39,7 +39,7 @@ static int neato_extra_args(int argc, char** argv) { for (i = 1; i < argc; i++) { arg = argv[i]; assert(arg != NULL); - if (*arg == '-') { + if (arg[0] == '-') { switch (arg[1]) { case 'x' : Reduce = TRUE; break; case 'n': @@ -128,7 +128,7 @@ config_extra_args(GVC_t *gvc, int argc, char** argv) for (i = 1; i < argc; i++) { arg = argv[i]; assert(arg != NULL); - if (*arg == '-') { + if (arg[0] == '-') { switch (arg[1]) { case 'v': gvc->common.verbose = 1; @@ -247,7 +247,7 @@ static int fdp_extra_args(int argc, char** argv) { for (i = 1; i < argc; i++) { arg = argv[i]; assert(arg != NULL); - if ((*arg == '-') && (*(arg+1) == 'L')) { + if (arg[0] == '-' && arg[1] == 'L') { if (setFDPAttr (arg+2)) { dotneato_usage(1); return -1;