summaryrefslogtreecommitdiff
path: root/gethost.c
diff options
context:
space:
mode:
authorJon TURNEY <jon.turney@dronecode.org.uk>2015-01-02 16:18:52 +0000
committerJon TURNEY <jon.turney@dronecode.org.uk>2015-01-05 17:34:56 +0000
commita58c9d74c8f9c4292d367c6e23d15c4cba03dfde (patch)
tree6a481c7f22d1d440fb4954cd4f5affa38c4391ba /gethost.c
parentf990dd936b5fd1a40290bb88cde517a0ac38f823 (diff)
downloadxorg-app-xauth-a58c9d74c8f9c4292d367c6e23d15c4cba03dfde.tar.gz
Fix !HAVE_STRLCPY case
Fix error in the !HAVE_STRLCPY case, introduced in commit f990dd936b5fd1a40290bb88cde517a0ac38f823 It seems that "path[sizeof(path) - 1]" rather than "buf[sizeof(path) - 1]" must be meant here, especially as the second instance doesn't even compile... parsedpy.c: In function ‘parse_displayname’: parsedpy.c:176:9: error: ‘buf’ undeclared (first use in this function) Signed-off-by: Jon TURNEY <jon.turney@dronecode.org.uk> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Reviewed-by: Jeremy Huddleston Sequoia <jeremyhu@apple.com>
Diffstat (limited to 'gethost.c')
-rw-r--r--gethost.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/gethost.c b/gethost.c
index c75ae02..e0dc8cb 100644
--- a/gethost.c
+++ b/gethost.c
@@ -200,7 +200,7 @@ struct addrlist *get_address_info (
strlcpy(path, fulldpyname, sizeof(path));
#else
strncpy(path, fulldpyname, sizeof(path));
- buf[sizeof(path) - 1] = '\0';
+ path[sizeof(path) - 1] = '\0';
#endif
if (0 == stat(path, &sbuf)) {
is_path_to_socket = 1;