summaryrefslogtreecommitdiff
path: root/pullreqd.c
diff options
context:
space:
mode:
authormrb0nk500 <b0nk@b0nk.xyz>2021-06-11 19:45:01 -0400
committermrb0nk500 <b0nk@b0nk.xyz>2021-06-11 19:45:01 -0400
commit27b25a10265724b6ab6af297653b72c5fb8754df (patch)
tree411fcc295489aa4b40c080953e7ce0b5311d12d2 /pullreqd.c
parentc18a84bf93e1098b1a8d53c8f2a17b1afec1c848 (diff)
Replace `!` with `== 0` for all calls to
`strcasecmp()`. This was done to make it more readable.
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 f077a50..3645f2f 100644
--- a/pullreqd.c
+++ b/pullreqd.c
@@ -96,7 +96,7 @@ int init_socket(config *cfg) {
/* Size of the socket address we're using. */
size_t sockaddr_size = 0;
/* Set socket type to unix socket, if socket-type was set to unix, otherwise set it to network socket. */
- const int sock_type = (!strcasecmp(cfg->sock_type, "unix")) ? AF_UNIX : AF_INET;
+ const int sock_type = (strcasecmp(cfg->sock_type, "unix") == 0) ? AF_UNIX : AF_INET;
if (sock_type == AF_UNIX) {
size_t path_length = strlen(cfg->sock);
@@ -180,7 +180,7 @@ void cleanup(config *cfg, int listen_socket) {
if (listen_socket > 0) {
close(listen_socket);
/* Is this a unix domain socket? */
- if (!strcasecmp(cfg->sock_type, "unix")) {
+ if (strcasecmp(cfg->sock_type, "unix") == 0) {
unlink(cfg->sock);
}
}