]> git.puffer.fish Git - matthieu/frr.git/commitdiff
Make more strings const.
authorhasso <hasso>
Thu, 7 Oct 2004 19:33:46 +0000 (19:33 +0000)
committerhasso <hasso>
Thu, 7 Oct 2004 19:33:46 +0000 (19:33 +0000)
lib/ChangeLog
lib/command.c
lib/pid_output.c
lib/print_version.c
lib/vty.c
lib/vty.h

index 84cf7fc9dab1585f86855fed716dbc96678932cd..3da0dfed241c0ef6d452a2ee3cefa486694e1ca9 100644 (file)
@@ -1,3 +1,8 @@
+2004-10-07 Hasso Tepper <hasso at quagga.net>
+
+       * command.c, pid_output.c, print_version.c, vty.c, vty.h: Make more
+         strings const.
+
 2004-10-05 Hasso Tepper <hasso at quagga.net>
 
        * *.[c|h]: Make many strings cons and a lot of int -> unsigned int
index c65e6fa8e4872fb3012b2ec312765de05616c9d5..330470e5fcc65e0abfdfbe13fb9c1885763fc332 100644 (file)
@@ -233,9 +233,10 @@ cmd_free_strvec (vector v)
 
 /* Fetch next description.  Used in cmd_make_descvec(). */
 char *
-cmd_desc_str (char **string)
+cmd_desc_str (const char **string)
 {
-  char *cp, *start, *token;
+  const char *cp, *start;
+  char *token;
   int strlen;
   
   cp = *string;
index 2d90afcaa566991e10582a310562d325876824ce..fca7ec83668abfefbdacb8d2b2fcffab098aa0b7 100644 (file)
 #include <fcntl.h>
 #include <log.h>
 
-pid_t pid_output_lock(char *);
+pid_t pid_output_lock(const char *);
 
 pid_t
-pid_output (char *path)
+pid_output (const char *path)
 {
 #ifndef HAVE_FCNTL
   FILE *fp;
@@ -54,7 +54,7 @@ pid_output (char *path)
 
 #ifdef HAVE_FCNTL
 pid_t
-pid_output_lock (char *path)
+pid_output_lock (const char *path)
 {
   int tmp;
   int fd;
index 1873faaffed27f21467c4222d8db35a3c9536459..3d8e67998d9345256cd92d52cfe675ddbe3ffd43 100644 (file)
@@ -24,7 +24,7 @@
 #include <lib/version.h>
 
 void
-print_version (char *progname)
+print_version (const char *progname)
 {
   printf ("%s version %s (%s)\n", progname, QUAGGA_VERSION, host_name);
   printf ("Copyright 1996-2001, Kunihiro Ishiguro\n");
index c10c984b87be29155df538b342c604017c6f91b1..42b7e92511ca9ab555aae6099d385154b00fa512 100644 (file)
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -1854,7 +1854,7 @@ vty_serv_sock_family (const char* addr, unsigned short port, int family)
 
 /* VTY shell UNIX domain socket. */
 void
-vty_serv_un (char *path)
+vty_serv_un (const char *path)
 {
   int ret;
   int sock, len, flags;
@@ -2019,7 +2019,7 @@ vtysh_read (struct thread *thread)
 
 /* Determine address family to bind. */
 void
-vty_serv_sock (const char *addr, unsigned short port, char *path)
+vty_serv_sock (const char *addr, unsigned short port, const char *path)
 {
   /* If port is set to 0, do not listen on TCP/IP at all! */
   if (port)
index 3cf9c4a2111efd5ba7a3ab72146f8d028b97b363..ffaad35700f5e06b7cd8efd9336d21c64f1f11ff 100644 (file)
--- a/lib/vty.h
+++ b/lib/vty.h
@@ -194,7 +194,7 @@ struct vty *vty_new (void);
 int vty_out (struct vty *, const char *, ...) PRINTF_ATTRIBUTE(2, 3);
 void vty_read_config (char *, char *);
 void vty_time_print (struct vty *, int);
-void vty_serv_sock (const char *, unsigned short, char *);
+void vty_serv_sock (const char *, unsigned short, const char *);
 void vty_close (struct vty *);
 char *vty_get_cwd (void);
 void vty_log (const char *, const char *, va_list);