summaryrefslogtreecommitdiff
path: root/gfx/gfx.c
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-08-24 18:11:50 -0300
committerWerner Almesberger <werner@almesberger.net>2016-08-24 18:11:50 -0300
commit667936dcbe9de31a4e293567386bd3f3261cfb1f (patch)
tree3a92e6a5b2bb163bca9d3945b5041ee993e449a1 /gfx/gfx.c
parent71d2312487fed19d2500357cb644c3801179f600 (diff)
downloadeeshow-667936dcbe9de31a4e293567386bd3f3261cfb1f.tar.gz
eeshow-667936dcbe9de31a4e293567386bd3f3261cfb1f.tar.bz2
eeshow-667936dcbe9de31a4e293567386bd3f3261cfb1f.zip
gfx/gfx.c (gfx_args): don't need to reset "optind" all over the place
Diffstat (limited to 'gfx/gfx.c')
-rw-r--r--gfx/gfx.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gfx/gfx.c b/gfx/gfx.c
index 4d79851..0b407ba 100644
--- a/gfx/gfx.c
+++ b/gfx/gfx.c
@@ -13,6 +13,7 @@
#include <stdbool.h>
#include <stdlib.h>
+#include <unistd.h> /* for optind */
#include "misc/util.h"
#include "gfx/style.h"
@@ -113,6 +114,7 @@ struct gfx *gfx_init(const struct gfx_ops *ops)
bool gfx_args(struct gfx *gfx, int argc, char *const *argv)
{
+ optind = 0;
return gfx->ops->args && gfx->ops->args(gfx->user, argc, argv);
}