From: Todd C. Miller Date: Sun, 10 Apr 2005 19:29:45 +0000 (+0000) Subject: Fix a warning on systems without strlcpy(). X-Git-Tag: SUDO_1_7_0~659 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=132a7994570d990f257d137426473e99ec9bc514;p=sudo Fix a warning on systems without strlcpy(). --- diff --git a/glob.c b/glob.c index b36e4cf8d..cf58d80d9 100644 --- a/glob.c +++ b/glob.c @@ -796,9 +796,10 @@ g_opendir(str, pglob) { char buf[PATH_MAX]; - if (!*str) - strlcpy(buf, ".", sizeof buf); - else { + if (!*str) { + buf[0] = '.'; + buf[1] = '\0'; + } else { if (g_Ctoc(str, buf, sizeof(buf))) return(NULL); }