Cosmetic bugfix. fetch was modifying it's argv[] strings in place, which

caused ps(1) to show strange things..
This commit is contained in:
Peter Wemm 1996-11-10 14:46:50 +00:00
parent d66e3876dd
commit e721a581cb
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=19611

View File

@ -24,7 +24,7 @@
* SUCH DAMAGE.
*/
/* $Id: main.c,v 1.25 1996/10/24 00:15:44 adam Exp $ */
/* $Id: main.c,v 1.26 1996/10/31 14:24:35 phk Exp $ */
#include <sys/types.h>
#include <sys/socket.h>
@ -140,6 +140,7 @@ int
main(int argc, char **argv)
{
int c;
char *s;
while ((c = getopt (argc, argv, "D:HINPMT:V:Lqc:f:h:o:plmnrv")) != -1) {
switch (c) {
@ -204,7 +205,10 @@ main(int argc, char **argv)
if (argv[0]) {
if (host || change_to_dir || file_to_get)
usage();
parse(argv[0]);
s = strdup(argv[0]);
if (s == NULL)
s = argv[0]; /* optomistic, I know.. malloc just failed. */
parse(s);
} else {
if (!host || !file_to_get)
usage();