]> git.proxmox.com Git - mirror_frr.git/commitdiff
*: fix warning fallout from set_socket_path
authorDavid Lamparter <equinox@opensourcerouting.org>
Wed, 1 Feb 2017 12:12:16 +0000 (13:12 +0100)
committerDavid Lamparter <equinox@opensourcerouting.org>
Wed, 1 Feb 2017 12:12:16 +0000 (13:12 +0100)
Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
12 files changed:
bgpd/bgp_main.c
isisd/isis_main.c
ldpd/ldpd.c
lib/sockopt.c
lib/sockopt.h
ospf6d/ospf6_main.c
ospfd/ospf_main.c
pimd/pim_main.c
ripd/rip_main.c
ripngd/ripng_main.c
vtysh/vtysh_main.c
zebra/main.c

index e6f5cdcb67d6bddcf4cf2ec14c524c453aa36495..ba59365a6ee9200000c31e43aa33daf2db35549f 100644 (file)
@@ -40,6 +40,7 @@ Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 #include "queue.h"
 #include "vrf.h"
 #include "bfd.h"
+#include "sockopt.h"
 
 #include "bgpd/bgpd.h"
 #include "bgpd/bgp_attr.h"
index 865f5c5f9455cf50b313befc5c5946df2d5d007d..1b9fa680511d325212f65f632939143813dbc5a6 100644 (file)
@@ -38,6 +38,7 @@
 #include "plist.h"
 #include "zclient.h"
 #include "vrf.h"
+#include "sockopt.h"
 #include "qobj.h"
 
 #include "isisd/dict.h"
@@ -246,7 +247,6 @@ main (int argc, char **argv, char **envp)
   struct thread thread;
   char *config_file = NULL;
   char *vty_addr = NULL;
-  char *vty_sock_name;
   int dryrun = 0;
 
   /* Get the programname without the preceding path. */
index 40726ba0bb8fb84d0a572e2cc429880f58bfb1d5..927af682a106e87ef0c8880d7b8761e87a4f0207 100644 (file)
@@ -39,6 +39,7 @@
 #include "sigevent.h"
 #include "zclient.h"
 #include "vrf.h"
+#include "sockopt.h"
 #include "qobj.h"
 
 static void             ldpd_shutdown(void);
@@ -224,7 +225,6 @@ main(int argc, char *argv[])
        char                    *p;
        char                    *vty_addr = NULL;
        int                      vty_port = LDP_VTY_PORT;
-       char                    *vty_sock_name;
        char                    *ctl_sock_custom_path = NULL;
        char                    *ctl_sock_name;
        int                      daemon_mode = 0;
index 570b575a7ae8ec3fe4e34d756fac78e32af0c30a..e661b4cc566f5e7e830342798253f5e1b5ab8b03 100644 (file)
@@ -31,9 +31,9 @@
 
 /* Replace the path of given defaultpath with newpath, but keep filename */
 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, '/');
   if (sock_name)
index 8e7895dd6f8c909520481f0d5c6558bf4e4907d3..7e1bd62446dbe67e5b0048a71b08883b3cc9a5f7 100644 (file)
@@ -25,7 +25,8 @@
 #include "sockunion.h"
 
 /* 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_sendbuf (const int sock, int size);
index 68d2b6894d6b8f6defba97a354f60a242c62df0c..f85580fa59a4bf619ea7f3fb0ac986dc3c46ad47 100644 (file)
@@ -39,6 +39,7 @@
 #include "zclient.h"
 #include "vrf.h"
 #include "bfd.h"
+#include "sockopt.h"
 
 #include "ospf6d.h"
 #include "ospf6_top.h"
@@ -239,7 +240,6 @@ main (int argc, char *argv[], char *envp[])
   int opt;
   char *vty_addr = NULL;
   int vty_port = 0;
-  char *vty_sock_name;
   char *config_file = NULL;
   struct thread thread;
   int dryrun = 0;
index 6719eb24970b8d244a3caf99a81ea96726b82dd3..845d96032bc062aa023eedaf0a5a3b450cf6a00c 100644 (file)
@@ -41,6 +41,7 @@
 #include "sigevent.h"
 #include "zclient.h"
 #include "vrf.h"
+#include "sockopt.h"
 
 #include "ospfd/ospfd.h"
 #include "ospfd/ospf_interface.h"
@@ -194,7 +195,6 @@ main (int argc, char **argv)
   char *vty_addr = NULL;
   int vty_port = OSPF_VTY_PORT;
   char vty_path[100];
-  char *vty_sock_name;
   int daemon_mode = 0;
   char *config_file = NULL;
   char *progname;
index 1a3c8165e4656491667bc60a4eceab9f33a245d5..e4aa2de594597d0996c3b3fe0bbe18bf23a3dcfd 100644 (file)
@@ -38,6 +38,7 @@
 #include "prefix.h"
 #include "plist.h"
 #include "vrf.h"
+#include "sockopt.h"
 
 #include "pimd.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) {
   char *p;
   char *vty_addr = NULL;
-  char *vty_sock_name;
   int vty_port = -1;
   int daemon_mode = 0;
   char *config_file = NULL;
index e46f867952ad8088aa77555fe54375d0f716555b..58dd2df6fa286339fc7436c1004771ac37d3b1e2 100644 (file)
@@ -35,6 +35,7 @@
 #include "sigevent.h"
 #include "zclient.h"
 #include "vrf.h"
+#include "sockopt.h"
 
 #include "ripd/ripd.h"
 
@@ -201,7 +202,6 @@ main (int argc, char **argv)
   int dryrun = 0;
   char *progname;
   struct thread thread;
-  char *vty_sock_name;
 
   /* Set umask before anything for security */
   umask (0027);
index 1677996eaafb616dbeb88894c91ba97e3626bd62..a90dffce1485a8c5a55f3d770edb9ba8432cb29f 100644 (file)
@@ -36,6 +36,7 @@
 #include "privs.h"
 #include "sigevent.h"
 #include "vrf.h"
+#include "sockopt.h"
 
 #include "ripngd/ripngd.h"
 
@@ -201,7 +202,6 @@ main (int argc, char **argv)
   char *progname;
   struct thread thread;
   int dryrun = 0;
-  char *vty_sock_name;
 
   /* Set umask before anything for security */
   umask (0027);
index bad21ae6614d96be8536a1606cc3ee12c85bbbe8..78b17be0581e227091ff0d4c43bfeca162bb8b8c 100644 (file)
@@ -272,7 +272,7 @@ main (int argc, char **argv, char **env)
   int boot_flag = 0;
   const char *daemon_name = NULL;
   const char *inputfile = NULL;
-  char *vtysh_configfile_name;
+  const char *vtysh_configfile_name;
   struct cmd_rec {
     const char *line;
     struct cmd_rec *next;
index aa1cbc3b267a887c931800c98059f59dffb88f09..a68e8adeb6a25a04be3d45aa5aac8dc8aad24d2b 100644 (file)
@@ -35,6 +35,7 @@
 #include "privs.h"
 #include "sigevent.h"
 #include "vrf.h"
+#include "sockopt.h"
 
 #include "zebra/rib.h"
 #include "zebra/zserv.h"
@@ -265,7 +266,6 @@ main (int argc, char **argv)
   char *p;
   char *vty_addr = NULL;
   int vty_port = ZEBRA_VTY_PORT;
-  char *vty_sock_name;
   int dryrun = 0;
   int batch_mode = 0;
   int daemon_mode = 0;