aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Andersen <andersen@codepoet.org>2000-04-18 21:18:57 +0000
committerErik Andersen <andersen@codepoet.org>2000-04-18 21:18:57 +0000
commitc366050a23630f0763159263d62b3f1efa0c46ef (patch)
treece8748eed3ec315986b81e3120ba7e7e5701297b
parentf29f797f54451a6a5801b065a2896ea403334f4f (diff)
downloadbusybox-w32-c366050a23630f0763159263d62b3f1efa0c46ef.tar.gz
busybox-w32-c366050a23630f0763159263d62b3f1efa0c46ef.tar.bz2
busybox-w32-c366050a23630f0763159263d62b3f1efa0c46ef.zip
Fix stupid bug (wrong variable)
-Erik
-rw-r--r--utility.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/utility.c b/utility.c
index 29934cdc3..0045e4d75 100644
--- a/utility.c
+++ b/utility.c
@@ -610,6 +610,7 @@ int recursiveAction(const char *fileName,
610 fprintf(stderr, name_too_long, "ftw"); 610 fprintf(stderr, name_too_long, "ftw");
611 return FALSE; 611 return FALSE;
612 } 612 }
613 memset(nextFile, 0, sizeof(nextFile));
613 sprintf(nextFile, "%s/%s", fileName, next->d_name); 614 sprintf(nextFile, "%s/%s", fileName, next->d_name);
614 status = 615 status =
615 recursiveAction(nextFile, TRUE, followLinks, depthFirst, 616 recursiveAction(nextFile, TRUE, followLinks, depthFirst,
@@ -1083,11 +1084,14 @@ extern int check_wildcard_match(const char *text, const char *pattern)
1083 if (*text == ch) 1084 if (*text == ch)
1084 found = TRUE; 1085 found = TRUE;
1085 } 1086 }
1086 1087 if (found == FALSE)
1087 //if (!found) 1088 continue;
1088 if (found == TRUE) { 1089 if (found == TRUE) {
1089 pattern = retryPat; 1090 //printf("Got a match. pattern='%s' text='%s'\n", pattern, text);
1090 text = ++retryText; 1091 if (retryPat || retryText) {
1092 pattern = retryPat;
1093 text = ++retryText;
1094 }
1091 } 1095 }
1092 1096
1093 /* fall into next case */ 1097 /* fall into next case */
@@ -1378,7 +1382,7 @@ extern pid_t* findPidByName( char* pidName)
1378 } 1382 }
1379 p=buffer+6; /* Skip the "Name:\t" */ 1383 p=buffer+6; /* Skip the "Name:\t" */
1380 1384
1381 if (((q=strstr(q, pidName)) != NULL) 1385 if (((q=strstr(p, pidName)) != NULL)
1382 && (strncmp(q, pidName, strlen(pidName)) != 0)) { 1386 && (strncmp(q, pidName, strlen(pidName)) != 0)) {
1383 pidList=realloc( pidList, sizeof(pid_t) * (i+2)); 1387 pidList=realloc( pidList, sizeof(pid_t) * (i+2));
1384 if (pidList==NULL) 1388 if (pidList==NULL)