]> granicus.if.org Git - sudo/commitdiff
Fix a warning on systems without strlcpy().
authorTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 10 Apr 2005 19:29:45 +0000 (19:29 +0000)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Sun, 10 Apr 2005 19:29:45 +0000 (19:29 +0000)
glob.c

diff --git a/glob.c b/glob.c
index b36e4cf8d50c35c81ed5b8a061371ea0096224fd..cf58d80d9b28bddcb5d790eb858a9f1e73ae4504 100644 (file)
--- 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);
        }