Module Name: src
Committed By: christos
Date: Fri Oct 4 18:06:53 UTC 2024
Modified Files:
src/usr.bin/ftp: extern.h ftp.c
Log Message:
remove const when string gets overwritten.
To generate a diff of this commit:
cvs rdiff -u -r1.83 -r1.84 src/usr.bin/ftp/extern.h
cvs rdiff -u -r1.177 -r1.178 src/usr.bin/ftp/ftp.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/ftp/extern.h
diff -u src/usr.bin/ftp/extern.h:1.83 src/usr.bin/ftp/extern.h:1.84
--- src/usr.bin/ftp/extern.h:1.83 Sat Feb 25 07:07:25 2023
+++ src/usr.bin/ftp/extern.h Fri Oct 4 14:06:53 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: extern.h,v 1.83 2023/02/25 12:07:25 mlelstv Exp $ */
+/* $NetBSD: extern.h,v 1.84 2024/10/04 18:06:53 christos Exp $ */
/*-
* Copyright (c) 1996-2023 The NetBSD Foundation, Inc.
@@ -137,7 +137,7 @@ char *getoptionvalue(const char *);
void getremoteinfo(void);
int getreply(int);
char *globulize(const char *);
-char *gunique(const char *);
+char *gunique(char *);
void help(int, char **);
char *hookup(const char *, const char *);
void idlecmd(int, char **);
@@ -176,7 +176,7 @@ void quit(int, char **);
void justquit(void) __dead;
void quote(int, char **);
void quote1(const char *, int, char **);
-void recvrequest(const char *, const char *, const char *,
+void recvrequest(const char *, char *, const char *,
const char *, int, int);
void reget(int, char **);
char *remglob(char **, int, const char **);
Index: src/usr.bin/ftp/ftp.c
diff -u src/usr.bin/ftp/ftp.c:1.177 src/usr.bin/ftp/ftp.c:1.178
--- src/usr.bin/ftp/ftp.c:1.177 Wed Sep 25 12:53:58 2024
+++ src/usr.bin/ftp/ftp.c Fri Oct 4 14:06:53 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: ftp.c,v 1.177 2024/09/25 16:53:58 christos Exp $ */
+/* $NetBSD: ftp.c,v 1.178 2024/10/04 18:06:53 christos Exp $ */
/*-
* Copyright (c) 1996-2021 The NetBSD Foundation, Inc.
@@ -92,7 +92,7 @@
#if 0
static char sccsid[] = "@(#)ftp.c 8.6 (Berkeley) 10/27/94";
#else
-__RCSID("$NetBSD: ftp.c,v 1.177 2024/09/25 16:53:58 christos Exp $");
+__RCSID("$NetBSD: ftp.c,v 1.178 2024/10/04 18:06:53 christos Exp $");
#endif
#endif /* not lint */
@@ -925,7 +925,7 @@ sendrequest(const char *cmd, const char
}
void
-recvrequest(const char *cmd, const char *volatile local, const char *remote,
+recvrequest(const char *cmd, char *volatile local, const char *remote,
const char *lmode, int printnames, int ignorespecial)
{
FILE *volatile fout;
@@ -2037,7 +2037,7 @@ reset(int argc, char *argv[])
}
char *
-gunique(const char *local)
+gunique(char *local)
{
static char new[MAXPATHLEN];
char *cp = strrchr(local, '/');