(remglob) Use while-loop.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@3810 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -771,25 +771,24 @@ remglob(char **argv, int doswitch)
|
|||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
next:
|
while(fgets(buf, sizeof (buf), ftemp)) {
|
||||||
if (fgets(buf, sizeof (buf), ftemp) == NULL) {
|
|
||||||
fclose(ftemp);
|
|
||||||
ftemp = NULL;
|
|
||||||
return (NULL);
|
|
||||||
}
|
|
||||||
if ((cp = strchr(buf, '\n')) != NULL)
|
if ((cp = strchr(buf, '\n')) != NULL)
|
||||||
*cp = '\0';
|
*cp = '\0';
|
||||||
if(strncmp(buf, "../", 3) == 0 || *buf == '/'){
|
if(strncmp(buf, "../", 3) == 0 || *buf == '/'){
|
||||||
if(interactive == 0){
|
if(interactive == 0){
|
||||||
printf("Ignoring remote globbed file `%s'\n", buf);
|
printf("Ignoring remote globbed file `%s'\n", buf);
|
||||||
goto next;
|
continue;
|
||||||
}
|
}
|
||||||
if(!confirm(buf, *buf == '/' ?
|
if(!confirm(buf, *buf == '/' ?
|
||||||
" - retrieve file starting with `/'" :
|
" - retrieve file starting with `/'" :
|
||||||
" - retrieve file starting with `..'"))
|
" - retrieve file starting with `..'"))
|
||||||
goto next;
|
continue;
|
||||||
}
|
}
|
||||||
return (buf);
|
return buf;
|
||||||
|
}
|
||||||
|
fclose(ftemp);
|
||||||
|
ftemp = NULL;
|
||||||
|
return (NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
@@ -1133,7 +1132,7 @@ ls(int argc, char **argv)
|
|||||||
code = -1;
|
code = -1;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
recvrequest(cmd, argv[2], argv[1], "w", 0, 0, 1);
|
recvrequest(cmd, argv[2], argv[1], "w", 0, 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Reference in New Issue
Block a user