From 744f46853039088cd84b419068ae1978b552f584 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Tue, 3 Mar 2015 08:57:02 +0100 Subject: [PATCH] lib: use const consistently for zserv path The global variable is missing its const, but the accessor function has a meaningless extra const in exchange... Signed-off-by: David Lamparter --- lib/zclient.c | 4 ++-- lib/zclient.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/zclient.c b/lib/zclient.c index 4fe5398e65..ea663329ca 100644 --- a/lib/zclient.c +++ b/lib/zclient.c @@ -39,7 +39,7 @@ enum event {ZCLIENT_SCHEDULE, ZCLIENT_READ, ZCLIENT_CONNECT}; /* Prototype for event manager. */ static void zclient_event (enum event, struct zclient *); -char *zclient_serv_path = NULL; +const char *zclient_serv_path = NULL; /* This file local debug flag. */ int zclient_debug = 0; @@ -1601,7 +1601,7 @@ zclient_event (enum event event, struct zclient *zclient) } } -const char *const zclient_serv_path_get() +const char *zclient_serv_path_get() { return zclient_serv_path ? zclient_serv_path : ZEBRA_SERV_PATH; } diff --git a/lib/zclient.h b/lib/zclient.h index 6bb1725963..f30190c1b4 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -167,7 +167,7 @@ extern void zclient_free (struct zclient *); extern int zclient_socket_connect (struct zclient *); extern void zclient_serv_path_set (char *path); -extern const char *const zclient_serv_path_get (void); +extern const char *zclient_serv_path_get (void); extern int redist_check_instance (struct redist_proto *, u_short); extern void redist_add_instance (struct redist_proto *, u_short); -- 2.39.5