From e94f778f1c5efdc4d11c61dec0e4a4ab073899d7 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Fri, 26 Jul 2024 00:56:13 -0400 Subject: plugin argparse update to add userdata to callback fix a couple of gotchas if you aren't using NULL terminated strings Change-Id: If5d2a60c0c3e1653e26df50bfda7d3191989bca9 --- apps/plugins/lib/arg_helper.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/plugins/lib/arg_helper.h') diff --git a/apps/plugins/lib/arg_helper.h b/apps/plugins/lib/arg_helper.h index 2cf94ba1dd..638279ee42 100644 --- a/apps/plugins/lib/arg_helper.h +++ b/apps/plugins/lib/arg_helper.h @@ -54,7 +54,7 @@ int num_parse(const char **parameter, int *number, int *decimal); * Note: WS at beginning is stripped, **parameter starts at the first NON WS char * return 0 for arg_callback to quit parsing immediately */ -void argparse(const char *parameter, int parameter_len, - int (*arg_callback)(char argchar, const char **parameter)); +void argparse(const char *parameter, int parameter_len, void *userdata, + int (*arg_callback)(char argchar, const char **parameter, void *userdata)); #endif /* _LIB_ARG_HELPER_H_ */ -- cgit v1.2.3