From 8686d3abba4c5b4baf443871cd19c673056a3392 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 3 Apr 2011 18:02:45 -0700 Subject: [PATCH] Move var declaration for older C compilers. --- flist.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/flist.c b/flist.c index f90c286c..0758f896 100644 --- a/flist.c +++ b/flist.c @@ -1734,11 +1734,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'; -- 2.34.1