summaryrefslogtreecommitdiff
path: root/pullreqd.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-10 23:44:18 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-10 23:44:18 -0400
commit11163d111cd7b07bbb518b2fe31a45c050ac80f1 (patch)
tree135152fd53b99cc27d160bc9c87ecb0ae58cee60 /pullreqd.c
parentefa339fff2de05131785bd0b3cf18a1e7c2c100a (diff)
Changed `fd` to a `const int`, and added a failed
socket creation reason in `init_socket()`.
Diffstat (limited to 'pullreqd.c')
-rw-r--r--pullreqd.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pullreqd.c b/pullreqd.c
index d884d63..4e04f5b 100644
--- a/pullreqd.c
+++ b/pullreqd.c
@@ -140,11 +140,11 @@ int init_socket(config *cfg) {
}
/* Create a new listen socket. */
- int fd = socket(sock_addr.sa.sa_family, SOCK_SEQPACKET, 0);
+ const int fd = socket(sock_addr.sa.sa_family, SOCK_SEQPACKET, 0);
/* Did we fail to create the listen socket? */
if (fd < 0) {
- syslog(LOG_ERR, "Failed to create listen socket.");
+ syslog(LOG_ERR, "Failed to create listen socket. Reason: %s", strerror(errno));
return -1;
}