move variable decl to beginning of block, should fix things for Nick Holland

on sparc (if there's no more of these)
no bin change, repair stuff that wouldn't build -> no bump
This commit is contained in:
espie 2011-07-01 10:24:53 +00:00
parent 2971384363
commit d2fa84de0c

View File

@ -0,0 +1,17 @@
$OpenBSD: patch-flist_c,v 1.3 2011/07/01 10:24:53 espie Exp $
--- flist.c.orig Fri Jul 1 12:18:23 2011
+++ flist.c Fri Jul 1 12:19:48 2011
@@ -1646,11 +1646,12 @@ static void send_directory(int f, struct file_list *fl
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';