tests: setprop_inplace: use xstrdup instead of unchecked strdup
This is the only strdup instance we have, all others are xstrdup. As strdup is _POSIX_C_SOURCE >= v200809L, which we don't require and we don't check strdup error return here, switch to xstrdup instead. This aligns the test with others that call xfuncs, mainly xmalloc(). Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>main
parent
a04f690250
commit
cd5f69cbc0
|
@ -58,7 +58,7 @@ int main(int argc, char *argv[])
|
|||
TEST_STRING_1);
|
||||
|
||||
verbose_printf("Old string value was \"%s\"\n", strp);
|
||||
xstr = strdup(strp);
|
||||
xstr = xstrdup(strp);
|
||||
xlen = strlen(xstr);
|
||||
for (i = 0; i < xlen; i++)
|
||||
xstr[i] = toupper(xstr[i]);
|
||||
|
|
Loading…
Reference in New Issue