*: fix warning fallout from set_socket_path

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
This commit is contained in:
David Lamparter 2017-02-01 13:12:16 +01:00
parent 681ca8cc52
commit ff1c42fb9f
12 changed files with 14 additions and 12 deletions

View file

@ -40,6 +40,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
#include "queue.h" #include "queue.h"
#include "vrf.h" #include "vrf.h"
#include "bfd.h" #include "bfd.h"
#include "sockopt.h"
#include "bgpd/bgpd.h" #include "bgpd/bgpd.h"
#include "bgpd/bgp_attr.h" #include "bgpd/bgp_attr.h"

View file

@ -38,6 +38,7 @@
#include "plist.h" #include "plist.h"
#include "zclient.h" #include "zclient.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "qobj.h" #include "qobj.h"
#include "isisd/dict.h" #include "isisd/dict.h"
@ -246,7 +247,6 @@ main (int argc, char **argv, char **envp)
struct thread thread; struct thread thread;
char *config_file = NULL; char *config_file = NULL;
char *vty_addr = NULL; char *vty_addr = NULL;
char *vty_sock_name;
int dryrun = 0; int dryrun = 0;
/* Get the programname without the preceding path. */ /* Get the programname without the preceding path. */

View file

@ -39,6 +39,7 @@
#include "sigevent.h" #include "sigevent.h"
#include "zclient.h" #include "zclient.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "qobj.h" #include "qobj.h"
static void ldpd_shutdown(void); static void ldpd_shutdown(void);
@ -224,7 +225,6 @@ main(int argc, char *argv[])
char *p; char *p;
char *vty_addr = NULL; char *vty_addr = NULL;
int vty_port = LDP_VTY_PORT; int vty_port = LDP_VTY_PORT;
char *vty_sock_name;
char *ctl_sock_custom_path = NULL; char *ctl_sock_custom_path = NULL;
char *ctl_sock_name; char *ctl_sock_name;
int daemon_mode = 0; int daemon_mode = 0;

View file

@ -31,9 +31,9 @@
/* Replace the path of given defaultpath with newpath, but keep filename */ /* Replace the path of given defaultpath with newpath, but keep filename */
void void
set_socket_path (char *path, char *defaultpath, char *newpath, int maxsize) set_socket_path (char *path, const char *defaultpath, char *newpath, int maxsize)
{ {
char *sock_name; const char *sock_name;
sock_name = strrchr(defaultpath, '/'); sock_name = strrchr(defaultpath, '/');
if (sock_name) if (sock_name)

View file

@ -25,7 +25,8 @@
#include "sockunion.h" #include "sockunion.h"
/* Override (vty) socket paths, but keep the filename */ /* Override (vty) socket paths, but keep the filename */
extern void set_socket_path (char *path, char *defaultpath, char *newpath, int maxsize); extern void set_socket_path (char *path, const char *defaultpath,
char *newpath, int maxsize);
extern void setsockopt_so_recvbuf (int sock, int size); extern void setsockopt_so_recvbuf (int sock, int size);
extern void setsockopt_so_sendbuf (const int sock, int size); extern void setsockopt_so_sendbuf (const int sock, int size);

View file

@ -39,6 +39,7 @@
#include "zclient.h" #include "zclient.h"
#include "vrf.h" #include "vrf.h"
#include "bfd.h" #include "bfd.h"
#include "sockopt.h"
#include "ospf6d.h" #include "ospf6d.h"
#include "ospf6_top.h" #include "ospf6_top.h"
@ -239,7 +240,6 @@ main (int argc, char *argv[], char *envp[])
int opt; int opt;
char *vty_addr = NULL; char *vty_addr = NULL;
int vty_port = 0; int vty_port = 0;
char *vty_sock_name;
char *config_file = NULL; char *config_file = NULL;
struct thread thread; struct thread thread;
int dryrun = 0; int dryrun = 0;

View file

@ -41,6 +41,7 @@
#include "sigevent.h" #include "sigevent.h"
#include "zclient.h" #include "zclient.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "ospfd/ospfd.h" #include "ospfd/ospfd.h"
#include "ospfd/ospf_interface.h" #include "ospfd/ospf_interface.h"
@ -194,7 +195,6 @@ main (int argc, char **argv)
char *vty_addr = NULL; char *vty_addr = NULL;
int vty_port = OSPF_VTY_PORT; int vty_port = OSPF_VTY_PORT;
char vty_path[100]; char vty_path[100];
char *vty_sock_name;
int daemon_mode = 0; int daemon_mode = 0;
char *config_file = NULL; char *config_file = NULL;
char *progname; char *progname;

View file

@ -38,6 +38,7 @@
#include "prefix.h" #include "prefix.h"
#include "plist.h" #include "plist.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "pimd.h" #include "pimd.h"
#include "pim_version.h" #include "pim_version.h"
@ -133,7 +134,6 @@ Report bugs to %s\n", progname, PIMD_BUG_ADDRESS);
int main(int argc, char** argv, char** envp) { int main(int argc, char** argv, char** envp) {
char *p; char *p;
char *vty_addr = NULL; char *vty_addr = NULL;
char *vty_sock_name;
int vty_port = -1; int vty_port = -1;
int daemon_mode = 0; int daemon_mode = 0;
char *config_file = NULL; char *config_file = NULL;

View file

@ -35,6 +35,7 @@
#include "sigevent.h" #include "sigevent.h"
#include "zclient.h" #include "zclient.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "ripd/ripd.h" #include "ripd/ripd.h"
@ -201,7 +202,6 @@ main (int argc, char **argv)
int dryrun = 0; int dryrun = 0;
char *progname; char *progname;
struct thread thread; struct thread thread;
char *vty_sock_name;
/* Set umask before anything for security */ /* Set umask before anything for security */
umask (0027); umask (0027);

View file

@ -36,6 +36,7 @@
#include "privs.h" #include "privs.h"
#include "sigevent.h" #include "sigevent.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "ripngd/ripngd.h" #include "ripngd/ripngd.h"
@ -201,7 +202,6 @@ main (int argc, char **argv)
char *progname; char *progname;
struct thread thread; struct thread thread;
int dryrun = 0; int dryrun = 0;
char *vty_sock_name;
/* Set umask before anything for security */ /* Set umask before anything for security */
umask (0027); umask (0027);

View file

@ -272,7 +272,7 @@ main (int argc, char **argv, char **env)
int boot_flag = 0; int boot_flag = 0;
const char *daemon_name = NULL; const char *daemon_name = NULL;
const char *inputfile = NULL; const char *inputfile = NULL;
char *vtysh_configfile_name; const char *vtysh_configfile_name;
struct cmd_rec { struct cmd_rec {
const char *line; const char *line;
struct cmd_rec *next; struct cmd_rec *next;

View file

@ -35,6 +35,7 @@
#include "privs.h" #include "privs.h"
#include "sigevent.h" #include "sigevent.h"
#include "vrf.h" #include "vrf.h"
#include "sockopt.h"
#include "zebra/rib.h" #include "zebra/rib.h"
#include "zebra/zserv.h" #include "zebra/zserv.h"
@ -265,7 +266,6 @@ main (int argc, char **argv)
char *p; char *p;
char *vty_addr = NULL; char *vty_addr = NULL;
int vty_port = ZEBRA_VTY_PORT; int vty_port = ZEBRA_VTY_PORT;
char *vty_sock_name;
int dryrun = 0; int dryrun = 0;
int batch_mode = 0; int batch_mode = 0;
int daemon_mode = 0; int daemon_mode = 0;