summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorhasso <hasso>2004-10-07 19:33:46 +0000
committerhasso <hasso>2004-10-07 19:33:46 +0000
commit6ad96ea16ee54578391bb4ca88d047ac9d3654fc (patch)
tree7a09427aaafcc48fe644ed4c2e6804005732b88f /lib
parent015253c3f14cacad85a761fae0259ad32f083d4a (diff)
Make more strings const.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog5
-rw-r--r--lib/command.c5
-rw-r--r--lib/pid_output.c6
-rw-r--r--lib/print_version.c2
-rw-r--r--lib/vty.c4
-rw-r--r--lib/vty.h2
6 files changed, 15 insertions, 9 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 84cf7fc9..3da0dfed 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -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
diff --git a/lib/command.c b/lib/command.c
index c65e6fa8..330470e5 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -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;
diff --git a/lib/pid_output.c b/lib/pid_output.c
index 2d90afca..fca7ec83 100644
--- a/lib/pid_output.c
+++ b/lib/pid_output.c
@@ -24,10 +24,10 @@
#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;
diff --git a/lib/print_version.c b/lib/print_version.c
index 1873faaf..3d8e6799 100644
--- a/lib/print_version.c
+++ b/lib/print_version.c
@@ -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");
diff --git a/lib/vty.c b/lib/vty.c
index c10c984b..42b7e925 100644
--- 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)
diff --git a/lib/vty.h b/lib/vty.h
index 3cf9c4a2..ffaad357 100644
--- 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);