aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main.c b/src/main.c
index ba091a7f0..364e20950 100644
--- a/src/main.c
+++ b/src/main.c
@@ -564,7 +564,7 @@ systemd_get_socket (gint number, gint listen_type)
if (e != NULL) {
errno = 0;
max = strtoul (e, &err, 10);
- if ((e == NULL || *e == '\0') && max > number + sd_listen_fds_start) {
+ if ((e == NULL || *e == '\0') && max > number) {
sock = number + sd_listen_fds_start;
if (fstat (sock, &st) == -1) {
return NULL;
@@ -584,7 +584,7 @@ systemd_get_socket (gint number, gint listen_type)
}
result = g_list_prepend (result, GINT_TO_POINTER (sock));
}
- else if (max <= number + sd_listen_fds_start) {
+ else if (max <= number) {
errno = EOVERFLOW;
}
}