From e234b351008e85756aba6276865582db15ace149 Mon Sep 17 00:00:00 2001 From: Gustavo Lima Chaves Date: Sun, 23 Apr 2017 23:00:57 -0700 Subject: [PATCH] Fix a missing variable referencing. Also put an explicit comment on something newer gccs could complain about. Signed-off-by: Gustavo Lima Chaves --- src/lib/flow/sol-flow-node-options.c | 2 +- src/modules/flow/form/form.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/flow/sol-flow-node-options.c b/src/lib/flow/sol-flow-node-options.c index dfea9797c..e7e2f2b8e 100644 --- a/src/lib/flow/sol-flow-node-options.c +++ b/src/lib/flow/sol-flow-node-options.c @@ -781,7 +781,7 @@ split_option(const char *input, const char **key, unsigned int *key_len, const c { const char *equal = strchr(input, '='); - if (!equal || equal == input || equal + 1 == '\0') + if (!equal || equal == input || *equal == 0 || *(equal + 1) == '\0') return -EINVAL; *key = input; diff --git a/src/modules/flow/form/form.c b/src/modules/flow/form/form.c index 958082228..93cf75c4e 100644 --- a/src/modules/flow/form/form.c +++ b/src/modules/flow/form/form.c @@ -1139,6 +1139,7 @@ integer_custom_open(struct sol_flow_node *node, mdata->blink_on = true; + /* outputs truncated on purpose -- only the return value matters */ n_max = snprintf(sbuf, 1, "%+" PRId32 "", mdata->base.state.max); SOL_INT_CHECK_GOTO(n_max, < 0, err);