diff options
author | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-02-14 19:53:55 -0800 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-02-17 18:54:31 -0800 |
commit | 5610c2cca68228c1ce8fa5006021e7859e632cf5 (patch) | |
tree | 45841d7c838aeff44bb21897bf75c347bfcd2e03 | |
parent | 471a4ef735fae193305b29484975e0201fc00a4f (diff) |
Fix -image argument parsing to not shadow "i" variable
Also avoids starting at the wrong argument if -image is not the first
flag passed to xcompmgr (though that's not really supported in the
current syntax).
Fixes gcc warning:
xcursorgen.c: In function `main':
xcursorgen.c:394: warning: declaration of 'i' shadows a previous local
xcursorgen.c:377: warning: shadowed declaration is here
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Reviewed-by: Jeremy Huddleston <jeremyhu@apple.com>
-rw-r--r-- | xcursorgen.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/xcursorgen.c b/xcursorgen.c index 195d6f6..fd41a77 100644 --- a/xcursorgen.c +++ b/xcursorgen.c @@ -391,13 +391,11 @@ main (int argc, char *argv[]) } if (strcmp (argv[i], "-image") == 0) { - int i = 2; int ret = 0; - while (argv[i]) + while (argv[++i]) { if (check_image (argv[i])) ret = i; - i++; } return ret; } |