(xreadlink): Omit size_t* arg. All uses changed.
authorJim Meyering <jim@meyering.net>
Tue, 4 Sep 2001 20:20:16 +0000 (20:20 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 4 Sep 2001 20:20:16 +0000 (20:20 +0000)
commitb6f4a765056b52c30e9b44ca0990f536dd0cb9de
tree9f6d3fe4850606c3e919d6d1bc9bd9b52ac8f769
parent0c306dfb653dca5b63d3c1ff969d45d363151285
(xreadlink): Omit size_t* arg.  All uses changed.
Use ssize_t, not int, to store result of readlink.
Check for ssize_t overflow as well as size_t overflow,
as POSIX says the result of readlink is implementation-defined
when ssize_t overflows.
Remove unnecessary cast to char*.
Use free+malloc instead of realloc, as the storage doesn't need
to be preserved and it's clearer and can be more efficient that way.
(SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
lib/xreadlink.c