-/* $OpenBSD: arguments.c,v 1.50 2021/09/09 13:38:32 nicm Exp $ */
+/* $OpenBSD: arguments.c,v 1.51 2021/09/09 21:55:03 nicm Exp $ */
/*
* Copyright (c) 2010 Nicholas Marriott <nicholas.marriott@gmail.com>
flag = *string++;
if (flag == '\0')
break;
+ if (flag == '?') {
+ args_free(args);
+ return (NULL);
+ }
if (!isalnum(flag)) {
xasprintf(cause, "invalid flag -%c", flag);
args_free(args);
-/* $OpenBSD: cmd.c,v 1.172 2021/08/27 17:25:55 nicm Exp $ */
+/* $OpenBSD: cmd.c,v 1.173 2021/09/09 21:55:03 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicholas.marriott@gmail.com>
const struct cmd_entry *entry;
struct cmd *cmd;
struct args *args;
- char *error;
+ char *error = NULL;
if (count == 0 || values[0].type != ARGS_STRING) {
xasprintf(cause, "no command");