move variable declaration to beginning of block for gcc2

ok naddy@, steven@
This commit is contained in:
martin 2006-07-19 19:21:01 +00:00
parent 17f428da4f
commit 68d118e63e

View File

@ -1,11 +1,17 @@
$OpenBSD: patch-portable_c,v 1.1 2006/04/07 23:14:13 pvalchev Exp $ --- portable.c.orig Tue Jul 16 17:55:11 1991
--- portable.c.orig Tue Jul 16 09:55:11 1991 +++ portable.c Tue Jul 18 22:49:22 2006
+++ portable.c Fri Apr 7 01:35:28 2006 @@ -345,6 +345,7 @@ ZOOFILE zoo_file;
@@ -364,6 +364,31 @@ ZOOFILE zoo_file; {
int status;
BYTE bytes[MAXDIRSIZE]; /* big enough to hold variable part too */
+ char *p;
/* To simplify things, we read the maximum possible size of the
directory entry including the variable size and discard what is not
@@ -364,6 +365,30 @@ ZOOFILE zoo_file;
show_dir(direntry); show_dir(direntry);
} }
#endif #endif
+ char *p;
+ /* take off '../' */ + /* take off '../' */
+ while ((p = strstr( direntry->dirname, "../" )) != NULL) { + while ((p = strstr( direntry->dirname, "../" )) != NULL) {
+ while (*(p+3) != '\0') { + while (*(p+3) != '\0') {