hdtest: Only show "**DEALLOCATED**" for NULL value but positive length

This commit is contained in:
Tatsuhiro Tsujikawa 2013-12-21 23:01:16 +09:00
parent e955598923
commit c242150092
1 changed files with 1 additions and 1 deletions

View File

@ -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));