+2008-01-07 Guillem Jover <guillem@debian.org>
+
+ * src/archives.c (archivefiles): Use arglist instead of narglist.
+
2008-01-07 Guillem Jover <guillem@debian.org>
* lib/nfmalloc.c (nfmalloc): Remove inline keyword as extern inline
m_pipe(pi);
if (!(fc= m_fork())) {
const char *const *ap;
- char **narglist;
int i;
m_dup2(pi[1],1); close(pi[0]); close(pi[1]);
for (i=0, ap=argv; *ap; ap++, i++);
- narglist= m_malloc(sizeof(char*)*(i+15));
- narglist[0] = FIND;
+ arglist = m_malloc(sizeof(char *) * (i + 15));
+ arglist[0] = FIND;
for (i=1, ap=argv; *ap; ap++, i++) {
if (strchr(FIND_EXPRSTARTCHARS,(*ap)[0])) {
char *a;
a= m_malloc(strlen(*ap)+10);
strcpy(a,"./");
strcat(a,*ap);
- narglist[i]= a;
+ arglist[i] = a;
} else {
- narglist[i] = (char *)*ap;
+ arglist[i] = (const char *)*ap;
}
}
/* When editing these, make sure that arglist is malloced big enough,
* above.
*/
- narglist[i++] = "-follow";
- narglist[i++] = "-name";
- narglist[i++] = ARCHIVE_FILENAME_PATTERN;
- narglist[i++] = "-type";
- narglist[i++] = "f";
- narglist[i++] = "-print0";
- narglist[i++]= 0;
- execvp(FIND, narglist);
+ arglist[i++] = "-follow";
+ arglist[i++] = "-name";
+ arglist[i++] = ARCHIVE_FILENAME_PATTERN;
+ arglist[i++] = "-type";
+ arglist[i++] = "f";
+ arglist[i++] = "-print0";
+ arglist[i++] = 0;
+ execvp(FIND, (char *const *)arglist);
ohshite(_("failed to exec find for --recursive"));
}
close(pi[1]);