Author: ed Date: Fri Nov 4 19:56:34 2011 New Revision: 227090 URL: http://svn.freebsd.org/changeset/base/227090
Log: Fix a warning emitted by Clang. The size passed to strlcat() must depend on the input length, not the output length. Because the input and output buffers are equal in size, the resulting binary does not change at all. Modified: head/lib/libc/stdlib/realpath.c Modified: head/lib/libc/stdlib/realpath.c ============================================================================== --- head/lib/libc/stdlib/realpath.c Fri Nov 4 19:12:07 2011 (r227089) +++ head/lib/libc/stdlib/realpath.c Fri Nov 4 19:56:34 2011 (r227090) @@ -212,7 +212,8 @@ realpath(const char * __restrict path, c symlink[slen] = '/'; symlink[slen + 1] = 0; } - left_len = strlcat(symlink, left, sizeof(left)); + left_len = strlcat(symlink, left, + sizeof(symlink)); if (left_len >= sizeof(left)) { if (m) free(resolved); _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"