Skip to content
Commit f1b20acb authored by Zubair Lutfullah Kakakhel's avatar Zubair Lutfullah Kakakhel Committed by Tom Rini
Browse files

hashtable: Fix length calculation in hexport_r



The length returned by hexport_r has a few redundant characters.
This appears as NULL characters at the end so seems harmless.

Remove the surplus counts in two places

totlen += strlen(ep->key) + 2;
I'm guessing the +2 here is for = and sep char. But there is another
totlen += 2; line that does that.

size = totletn + 1;
Doesn't make sense and isn't justified with any comment.

Signed-off-by: default avatarZubair Lutfullah Kakakhel <zubair@resin.io>
parent e9ee7398
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment