mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-04-30 18:25:15 +00:00
Make more strings const.
This commit is contained in:
parent
015253c3f1
commit
6ad96ea16e
@ -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>
|
2004-10-05 Hasso Tepper <hasso at quagga.net>
|
||||||
|
|
||||||
* *.[c|h]: Make many strings cons and a lot of int -> unsigned int
|
* *.[c|h]: Make many strings cons and a lot of int -> unsigned int
|
||||||
|
@ -233,9 +233,10 @@ cmd_free_strvec (vector v)
|
|||||||
|
|
||||||
/* Fetch next description. Used in cmd_make_descvec(). */
|
/* Fetch next description. Used in cmd_make_descvec(). */
|
||||||
char *
|
char *
|
||||||
cmd_desc_str (char **string)
|
cmd_desc_str (const char **string)
|
||||||
{
|
{
|
||||||
char *cp, *start, *token;
|
const char *cp, *start;
|
||||||
|
char *token;
|
||||||
int strlen;
|
int strlen;
|
||||||
|
|
||||||
cp = *string;
|
cp = *string;
|
||||||
|
@ -24,10 +24,10 @@
|
|||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <log.h>
|
#include <log.h>
|
||||||
|
|
||||||
pid_t pid_output_lock(char *);
|
pid_t pid_output_lock(const char *);
|
||||||
|
|
||||||
pid_t
|
pid_t
|
||||||
pid_output (char *path)
|
pid_output (const char *path)
|
||||||
{
|
{
|
||||||
#ifndef HAVE_FCNTL
|
#ifndef HAVE_FCNTL
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
@ -54,7 +54,7 @@ pid_output (char *path)
|
|||||||
|
|
||||||
#ifdef HAVE_FCNTL
|
#ifdef HAVE_FCNTL
|
||||||
pid_t
|
pid_t
|
||||||
pid_output_lock (char *path)
|
pid_output_lock (const char *path)
|
||||||
{
|
{
|
||||||
int tmp;
|
int tmp;
|
||||||
int fd;
|
int fd;
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
#include <lib/version.h>
|
#include <lib/version.h>
|
||||||
|
|
||||||
void
|
void
|
||||||
print_version (char *progname)
|
print_version (const char *progname)
|
||||||
{
|
{
|
||||||
printf ("%s version %s (%s)\n", progname, QUAGGA_VERSION, host_name);
|
printf ("%s version %s (%s)\n", progname, QUAGGA_VERSION, host_name);
|
||||||
printf ("Copyright 1996-2001, Kunihiro Ishiguro\n");
|
printf ("Copyright 1996-2001, Kunihiro Ishiguro\n");
|
||||||
|
@ -1854,7 +1854,7 @@ vty_serv_sock_family (const char* addr, unsigned short port, int family)
|
|||||||
|
|
||||||
/* VTY shell UNIX domain socket. */
|
/* VTY shell UNIX domain socket. */
|
||||||
void
|
void
|
||||||
vty_serv_un (char *path)
|
vty_serv_un (const char *path)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
int sock, len, flags;
|
int sock, len, flags;
|
||||||
@ -2019,7 +2019,7 @@ vtysh_read (struct thread *thread)
|
|||||||
|
|
||||||
/* Determine address family to bind. */
|
/* Determine address family to bind. */
|
||||||
void
|
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 is set to 0, do not listen on TCP/IP at all! */
|
||||||
if (port)
|
if (port)
|
||||||
|
@ -194,7 +194,7 @@ struct vty *vty_new (void);
|
|||||||
int vty_out (struct vty *, const char *, ...) PRINTF_ATTRIBUTE(2, 3);
|
int vty_out (struct vty *, const char *, ...) PRINTF_ATTRIBUTE(2, 3);
|
||||||
void vty_read_config (char *, char *);
|
void vty_read_config (char *, char *);
|
||||||
void vty_time_print (struct vty *, int);
|
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 *);
|
void vty_close (struct vty *);
|
||||||
char *vty_get_cwd (void);
|
char *vty_get_cwd (void);
|
||||||
void vty_log (const char *, const char *, va_list);
|
void vty_log (const char *, const char *, va_list);
|
||||||
|
Loading…
Reference in New Issue
Block a user