~leon_plickat/public-inbox

wlclock: Don't clobber global optind with BSD getopt_long() v1 PROPOSED

Jan Beich: 1
 Don't clobber global optind with BSD getopt_long()

 1 files changed, 1 insertions(+), 1 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~leon_plickat/public-inbox/patches/54271/mbox | git am -3
Learn more about email & git

[PATCH wlclock] Don't clobber global optind with BSD getopt_long() Export this patch

$ wlclock --corner-radius 90
ERROR: Radius configuration requires one or four arguments.
---
 src/wlclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/wlclock.c b/src/wlclock.c
index a26d0d3e0eae..bbbcca70570c 100644
--- a/src/wlclock.c
+++ b/src/wlclock.c
@@ -330,7 +330,7 @@ static bool handle_command_flags (int argc, char *argv[])
	int opt, args;
	extern int optind;
	extern char *optarg;
	while ( (opt = getopt_long(argc, argv, "hvV", opts, &optind)) != -1 ) switch (opt)
	while ( (opt = getopt_long(argc, argv, "hvV", opts, NULL)) != -1 ) switch (opt)
	{
		case 'h':
			fputs(usage, stderr);