Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/ftp Some const cleanups.



details:   https://anonhg.NetBSD.org/src/rev/ccc65f70b6f4
branches:  trunk
changeset: 580993:ccc65f70b6f4
user:      lukem <lukem%NetBSD.org@localhost>
date:      Thu May 19 02:55:37 2005 +0000

description:
Some const cleanups.

diffstat:

 usr.bin/ftp/cmds.c     |  6 +++---
 usr.bin/ftp/complete.c |  8 ++++----
 usr.bin/ftp/extern.h   |  6 +++---
 usr.bin/ftp/util.c     |  6 +++---
 4 files changed, 13 insertions(+), 13 deletions(-)

diffs (117 lines):

diff -r 5f0deaeb0377 -r ccc65f70b6f4 usr.bin/ftp/cmds.c
--- a/usr.bin/ftp/cmds.c        Thu May 19 01:37:30 2005 +0000
+++ b/usr.bin/ftp/cmds.c        Thu May 19 02:55:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cmds.c,v 1.112 2005/04/11 01:49:31 lukem Exp $ */
+/*     $NetBSD: cmds.c,v 1.113 2005/05/19 02:55:37 lukem Exp $ */
 
 /*-
  * Copyright (c) 1996-2005 The NetBSD Foundation, Inc.
@@ -103,7 +103,7 @@
 #if 0
 static char sccsid[] = "@(#)cmds.c     8.6 (Berkeley) 10/9/94";
 #else
-__RCSID("$NetBSD: cmds.c,v 1.112 2005/04/11 01:49:31 lukem Exp $");
+__RCSID("$NetBSD: cmds.c,v 1.113 2005/05/19 02:55:37 lukem Exp $");
 #endif
 #endif /* not lint */
 
@@ -776,7 +776,7 @@
        fclose(fp);
 }
 
-char *
+const char *
 onoff(int bool)
 {
 
diff -r 5f0deaeb0377 -r ccc65f70b6f4 usr.bin/ftp/complete.c
--- a/usr.bin/ftp/complete.c    Thu May 19 01:37:30 2005 +0000
+++ b/usr.bin/ftp/complete.c    Thu May 19 02:55:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: complete.c,v 1.38 2000/05/01 10:35:17 lukem Exp $      */
+/*     $NetBSD: complete.c,v 1.39 2005/05/19 02:55:37 lukem Exp $      */
 
 /*-
  * Copyright (c) 1997-2000 The NetBSD Foundation, Inc.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: complete.c,v 1.38 2000/05/01 10:35:17 lukem Exp $");
+__RCSID("$NetBSD: complete.c,v 1.39 2005/05/19 02:55:37 lukem Exp $");
 #endif /* not lint */
 
 /*
@@ -68,7 +68,7 @@
 static int
 comparstr(const void *a, const void *b)
 {
-       return (strcmp(*(const char **)a, *(const char **)b));
+       return (strcmp(*(const char * const *)a, *(const char * const *)b));
 }
 
 /*
@@ -304,7 +304,7 @@
 
        if (dirchange || dirlist == NULL ||
            strcmp(dir, lastdir) != 0) {                /* dir not cached */
-               char *emesg;
+               const char *emesg;
 
                if (dirlist != NULL)
                        sl_free(dirlist, 1);
diff -r 5f0deaeb0377 -r ccc65f70b6f4 usr.bin/ftp/extern.h
--- a/usr.bin/ftp/extern.h      Thu May 19 01:37:30 2005 +0000
+++ b/usr.bin/ftp/extern.h      Thu May 19 02:55:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: extern.h,v 1.67 2005/05/14 15:26:43 lukem Exp $        */
+/*     $NetBSD: extern.h,v 1.68 2005/05/19 02:55:37 lukem Exp $        */
 
 /*-
  * Copyright (c) 1996-2005 The NetBSD Foundation, Inc.
@@ -170,7 +170,7 @@
 void   mlst(int, char **);
 void   modtime(int, char **);
 void   mput(int, char **);
-char   *onoff(int);
+const char *onoff(int);
 void   opts(int, char **);
 void   newer(int, char **);
 void   page(int, char **);
@@ -189,7 +189,7 @@
 void   recvrequest(const char *, const char *, const char *,
            const char *, int, int);
 void   reget(int, char **);
-char   *remglob(char **, int, char **);
+char   *remglob(char **, int, const char **);
 time_t remotemodtime(const char *, int);
 off_t  remotesize(const char *, int);
 void   removedir(int, char **);
diff -r 5f0deaeb0377 -r ccc65f70b6f4 usr.bin/ftp/util.c
--- a/usr.bin/ftp/util.c        Thu May 19 01:37:30 2005 +0000
+++ b/usr.bin/ftp/util.c        Thu May 19 02:55:37 2005 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: util.c,v 1.123 2005/05/14 18:56:45 dsl Exp $   */
+/*     $NetBSD: util.c,v 1.124 2005/05/19 02:55:37 lukem Exp $ */
 
 /*-
  * Copyright (c) 1997-2005 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
 
 #include <sys/cdefs.h>
 #ifndef lint
-__RCSID("$NetBSD: util.c,v 1.123 2005/05/14 18:56:45 dsl Exp $");
+__RCSID("$NetBSD: util.c,v 1.124 2005/05/19 02:55:37 lukem Exp $");
 #endif /* not lint */
 
 /*
@@ -528,7 +528,7 @@
  * of writing to the screen.
  */
 char *
-remglob(char *argv[], int doswitch, char **errbuf)
+remglob(char *argv[], int doswitch, const char **errbuf)
 {
         char temp[MAXPATHLEN];
         static char buf[MAXPATHLEN];



Home | Main Index | Thread Index | Old Index