=================================================================== RCS file: /cvsrepo/anoncvs/cvs/src/usr.bin/tmux/arguments.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- src/usr.bin/tmux/arguments.c 2019/07/09 14:03:12 1.27 +++ src/usr.bin/tmux/arguments.c 2020/03/17 16:02:38 1.28 @@ -1,4 +1,4 @@ -/* $OpenBSD: arguments.c,v 1.27 2019/07/09 14:03:12 nicm Exp $ */ +/* $OpenBSD: arguments.c,v 1.28 2020/03/17 16:02:38 nicm Exp $ */ /* * Copyright (c) 2010 Nicholas Marriott @@ -75,6 +75,7 @@ optreset = 1; optind = 1; + optarg = NULL; while ((opt = getopt(argc, argv, template)) != -1) { if (opt < 0) @@ -84,6 +85,7 @@ return (NULL); } args_set(args, opt, optarg); + optarg = NULL; } argc -= optind; argv += optind;