Move var declaration for older C compilers.
authorWayne Davison <wayned@samba.org>
Mon, 4 Apr 2011 01:02:45 +0000 (18:02 -0700)
committerWayne Davison <wayned@samba.org>
Fri, 24 Jun 2011 22:09:55 +0000 (15:09 -0700)
flist.c

diff --git a/flist.c b/flist.c
index 7102b5b..9e5bdd0 100644 (file)
--- a/flist.c
+++ b/flist.c
@@ -1646,11 +1646,12 @@ static void send_directory(int f, struct file_list *flist, char *fbuf, int len,
                remainder = 0;
 
        for (errno = 0, di = readdir(d); di; errno = 0, di = readdir(d)) {
+               unsigned name_len;
                char *dname = d_name(di);
                if (dname[0] == '.' && (dname[1] == '\0'
                    || (dname[1] == '.' && dname[2] == '\0')))
                        continue;
-               unsigned name_len = strlcpy(p, dname, remainder);
+               name_len = strlcpy(p, dname, remainder);
                if (name_len >= remainder) {
                        char save = fbuf[len];
                        fbuf[len] = '\0';