summaryrefslogtreecommitdiff
path: root/libdaemon
diff options
context:
space:
mode:
authorAlasdair G Kergon <agk@redhat.com>2017-10-18 15:57:46 +0100
committerAlasdair G Kergon <agk@redhat.com>2017-10-18 15:58:13 +0100
commitf1cc5b12fd80c3c62247fccfb2e5537aef27533d (patch)
treef839eaa11450e9f52d9a3915e54db009c839d303 /libdaemon
parent327d9d59be6f7179b2e0a756deaa0f9a196e0651 (diff)
downloadlvm2-f1cc5b12fd80c3c62247fccfb2e5537aef27533d.tar.gz
tidy: Add missing underscores to statics.
Diffstat (limited to 'libdaemon')
-rw-r--r--libdaemon/client/config-util.c4
-rw-r--r--libdaemon/server/daemon-log.c8
-rw-r--r--libdaemon/server/daemon-server.c4
3 files changed, 8 insertions, 8 deletions
diff --git a/libdaemon/client/config-util.c b/libdaemon/client/config-util.c
index 5b6cfb82a..32f36f6eb 100644
--- a/libdaemon/client/config-util.c
+++ b/libdaemon/client/config-util.c
@@ -304,7 +304,7 @@ struct dm_config_node *config_make_nodes(struct dm_config_tree *cft,
}
/* Test if the doubles are close enough to be considered equal */
-static int close_enough(double d1, double d2)
+static int _close_enough(double d1, double d2)
{
return fabs(d1 - d2) < DBL_EPSILON;
}
@@ -320,7 +320,7 @@ int compare_value(struct dm_config_value *a, struct dm_config_value *b)
switch (a->type) {
case DM_CFG_STRING: r = strcmp(a->v.str, b->v.str); break;
- case DM_CFG_FLOAT: r = close_enough(a->v.f, b->v.f) ? 0 : (a->v.f > b->v.f) ? 1 : -1; break;
+ case DM_CFG_FLOAT: r = _close_enough(a->v.f, b->v.f) ? 0 : (a->v.f > b->v.f) ? 1 : -1; break;
case DM_CFG_INT: r = (a->v.i == b->v.i) ? 0 : (a->v.i > b->v.i) ? 1 : -1; break;
case DM_CFG_EMPTY_ARRAY: return 0;
}
diff --git a/libdaemon/server/daemon-log.c b/libdaemon/server/daemon-log.c
index e0fe18827..3be55736b 100644
--- a/libdaemon/server/daemon-log.c
+++ b/libdaemon/server/daemon-log.c
@@ -24,7 +24,7 @@ struct backend {
void (*log)(log_state *s, void **state, int type, const char *message);
};
-static void log_syslog(log_state *s, void **state, int type, const char *message)
+static void _log_syslog(log_state *s, void **state, int type, const char *message)
{
int prio;
@@ -44,7 +44,7 @@ static void log_syslog(log_state *s, void **state, int type, const char *message
syslog(prio, "%s", message);
}
-static void log_stderr(log_state *s, void **state, int type, const char *message)
+static void _log_stderr(log_state *s, void **state, int type, const char *message)
{
const char *prefix;
@@ -60,8 +60,8 @@ static void log_stderr(log_state *s, void **state, int type, const char *message
}
struct backend backend[] = {
- { DAEMON_LOG_OUTLET_SYSLOG, log_syslog },
- { DAEMON_LOG_OUTLET_STDERR, log_stderr },
+ { DAEMON_LOG_OUTLET_SYSLOG, _log_syslog },
+ { DAEMON_LOG_OUTLET_STDERR, _log_stderr },
{ 0, 0 }
};
diff --git a/libdaemon/server/daemon-server.c b/libdaemon/server/daemon-server.c
index 2ffdf402d..3b19883ff 100644
--- a/libdaemon/server/daemon-server.c
+++ b/libdaemon/server/daemon-server.c
@@ -498,7 +498,7 @@ fail:
return NULL;
}
-static int handle_connect(daemon_state s)
+static int _handle_connect(daemon_state s)
{
thread_state *ts;
struct sockaddr_un sockaddr;
@@ -651,7 +651,7 @@ void daemon_start(daemon_state s)
perror("select error");
if (FD_ISSET(s.socket_fd, &in)) {
timeout_count = 0;
- handle_connect(s);
+ _handle_connect(s);
}
_reap(s, 0);