Add some braces to keep egcs happy.

This commit is contained in:
thorpej 1998-08-18 23:57:02 +00:00
parent 5232b66bd5
commit fbfd17276b
1 changed files with 4 additions and 3 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: res_debug.c,v 1.17 1998/07/26 12:30:15 mycroft Exp $ */
/* $NetBSD: res_debug.c,v 1.18 1998/08/18 23:57:02 thorpej Exp $ */
/*-
* Copyright (c) 1985, 1990, 1993
@ -81,7 +81,7 @@
static char sccsid[] = "@(#)res_debug.c 8.1 (Berkeley) 6/4/93";
static char rcsid[] = "Id: res_debug.c,v 8.20 1997/06/01 20:34:37 vixie Exp ";
#else
__RCSID("$NetBSD: res_debug.c,v 1.17 1998/07/26 12:30:15 mycroft Exp $");
__RCSID("$NetBSD: res_debug.c,v 1.18 1998/08/18 23:57:02 thorpej Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@ -466,11 +466,12 @@ __p_fqnname(cp, msg, msglen, name, namelen)
if ((n = dn_expand(msg, cp + msglen, cp, name, namelen)) < 0)
return (NULL);
newlen = strlen (name);
if (newlen == 0 || name[newlen - 1] != '.')
if (newlen == 0 || name[newlen - 1] != '.') {
if (newlen+1 >= namelen) /* Lack space for final dot */
return (NULL);
else
strcpy(name + newlen, ".");
}
return (cp + n);
}