X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=lib%2Fxreadlink.c;h=f5cce16eb8f9adf763c0deec7c44556b66feedc2;hb=4b08703dc1d89681fcba8be35b7e7884b446b38f;hp=b58330a1d019e35007558569aa064b2c2529baee;hpb=b6f4a765056b52c30e9b44ca0990f536dd0cb9de;p=gnulib.git diff --git a/lib/xreadlink.c b/lib/xreadlink.c index b58330a1d..f5cce16eb 100644 --- a/lib/xreadlink.c +++ b/lib/xreadlink.c @@ -1,6 +1,6 @@ -/* exclude.c -- exclude file names +/* xreadlink.c -- readlink wrapper to return the link name in malloc'd storage - Copyright 2001 Free Software Foundation, Inc. + Copyright (C) 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,12 +29,8 @@ extern int errno; #endif -#if HAVE_LIMITS_H -# include -#endif -#if HAVE_SYS_TYPES_H -# include -#endif +#include +#include #if HAVE_STDLIB_H # include #endif @@ -78,7 +74,7 @@ xreadlink (char const *filename) return NULL; } - if (link_length < buf_size) + if ((size_t) link_length < buf_size) { buffer[link_length] = 0; return buffer;