summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Bollo <jose.bollo@iot.bzh>2016-04-07 13:43:27 +0200
committerJosé Bollo <jose.bollo@iot.bzh>2016-04-07 13:43:27 +0200
commitff24b370ba3f32959068b0cf3b2492e81cf58dda (patch)
tree7d2499905617e47ddb443fbd4fe9403df20c507f
parent94a5b505f7ef7760fcfa7b824ee49758eb63a9e8 (diff)
fix parameters without value
Change-Id: I104186ab681ebcc3198ad9e57894a0652a0901dc Signed-off-by: José Bollo <jose.bollo@iot.bzh>
-rw-r--r--src/afb-hreq.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-hreq.c b/src/afb-hreq.c
index 5ac45843..8928266e 100644
--- a/src/afb-hreq.c
+++ b/src/afb-hreq.c
@@ -519,8 +519,8 @@ static int _iterargs_(struct iterdata *id, enum MHD_ValueKind kind, const char *
return 1;
return id->iterator(id->closure, (struct afb_arg){
.name = key,
- .value = value,
- .size = 0,
+ .value = value ? : "",
+ .size = value ? strlen(value) : 0,
.path = NULL
});
}