From c24215009297d23ef961fb839cfe9a38dbe27a52 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Sat, 21 Dec 2013 23:01:16 +0900 Subject: [PATCH] hdtest: Only show "**DEALLOCATED**" for NULL value but positive length --- hdtest/comp_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hdtest/comp_helper.c b/hdtest/comp_helper.c index 219501e4..3f4606a0 100644 --- a/hdtest/comp_helper.c +++ b/hdtest/comp_helper.c @@ -26,7 +26,7 @@ static void dump_val(json_t *jent, const char *key, uint8_t *val, size_t len) { - if(val == NULL) { + if(val == NULL && len > 0) { json_object_set_new(jent, key, json_string("**DEALLOCATED**")); } else { json_object_set_new(jent, key, json_pack("s#", val, len));