aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
authorMikhail Gusarov <dottedmag@dottedmag.net>2014-03-29 10:42:52 +0100
committerMikhail Gusarov <dottedmag@dottedmag.net>2014-03-29 10:42:52 +0100
commit9eea2e9e758aea0cf1db074cf95bfabca79f8484 (patch)
treec3a439ac92fb35822d0075e9f88ec5080b6a0c17 /src/main.c
parent3207d23e88cf1a65653d5edf0666630124c1e0a9 (diff)
downloadrspamd-9eea2e9e758aea0cf1db074cf95bfabca79f8484.tar.gz
rspamd-9eea2e9e758aea0cf1db074cf95bfabca79f8484.zip
Rename variable to decrease confusion
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/main.c b/src/main.c
index 7aae80b4a..1c5260428 100644
--- a/src/main.c
+++ b/src/main.c
@@ -552,7 +552,7 @@ create_listen_socket (const gchar *addr, gint port, gint listen_type)
static GList *
systemd_get_socket (gint number)
{
- int sock, max, flags;
+ int sock, num_passed, flags;
GList *result = NULL;
const gchar *e;
gchar *err;
@@ -563,8 +563,8 @@ systemd_get_socket (gint number)
e = getenv ("LISTEN_FDS");
if (e != NULL) {
errno = 0;
- max = strtoul (e, &err, 10);
- if ((err == NULL || *err == '\0') && max > number) {
+ num_passed = strtoul (e, &err, 10);
+ if ((err == NULL || *err == '\0') && num_passed > number) {
sock = number + sd_listen_fds_start;
if (fstat (sock, &st) == -1) {
return NULL;
@@ -579,7 +579,7 @@ systemd_get_socket (gint number)
}
result = g_list_prepend (result, GINT_TO_POINTER (sock));
}
- else if (max <= number) {
+ else if (num_passed <= number) {
errno = EOVERFLOW;
}
}