A
Andrej Prsa
Hi!
Is there a way to reliably test whether a string was ever declared? E.g.
char *str;
test (str); /* -> no */
str = strdup ("contents");
test (str); /* -> yes */
I managed to do it if I set char *str = NULL and then check whether str ==
NULL in a test function, but I feel this is a workaround.
Thanks,
Andrej
Is there a way to reliably test whether a string was ever declared? E.g.
char *str;
test (str); /* -> no */
str = strdup ("contents");
test (str); /* -> yes */
I managed to do it if I set char *str = NULL and then check whether str ==
NULL in a test function, but I feel this is a workaround.
Thanks,
Andrej