common: Keep null/zero-len entries out of the IEEE1284 dictionary.
This commit is contained in:
parent
6c0efde77c
commit
484c53fa1a
|
@ -206,6 +206,9 @@ int parse1284_data(const char *device_id, struct deviceid_dict* dict)
|
|||
*ptr = 0;
|
||||
device_id++;
|
||||
|
||||
if (!strlen(key) || strlen(val))
|
||||
continue;
|
||||
|
||||
/* Add it to the dictionary */
|
||||
dict[num].key = strdup(key);
|
||||
dict[num].val = strdup(val);
|
||||
|
|
Loading…
Reference in a new issue