Per some comments from Lars Kellogg-Stedman <lars@larsshack.org>,

make xreadlink() return NULL on failure, and make sure everyone
uses the interface correctly.
 -Erik
This commit is contained in:
Eric Andersen
2001-05-07 17:48:28 +00:00
parent 822c3837f9
commit 28355a36da
7 changed files with 16 additions and 11 deletions

View File

@ -37,6 +37,8 @@ int readlink_main(int argc, char **argv)
show_usage();
buf = xreadlink(argv[1]);
if (!buf)
return EXIT_FAILURE;
puts(buf);
#ifdef BB_FEATURE_CLEAN_UP
free(buf);