diff options
author | Christian Hesse <mail@eworm.de> | 2013-11-05 08:40:46 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-11-05 08:40:46 +0100 |
commit | 8551d4885a4bf5997e0aa97852719168ee8d5457 (patch) | |
tree | 65e14837f296b88355d5c9ce2fe8c43b4654784c | |
parent | 8670d1284bb8ec42bb305680eac91a919b78ae3f (diff) | |
download | paccache-8551d4885a4bf5997e0aa97852719168ee8d5457.tar.gz paccache-8551d4885a4bf5997e0aa97852719168ee8d5457.tar.zst |
coding style cleanup
-rw-r--r-- | pacredir.c | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -499,16 +499,13 @@ int main(int argc, char ** argv) { iniparser_freedict(ini); /* allocate main loop object */ - if (!(simple_poll = avahi_simple_poll_new())) { + if ((simple_poll = avahi_simple_poll_new()) == NULL) { write_log(stderr, "Failed to create simple poll object.\n"); goto fail; } /* allocate a new client */ - client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error); - - /* check wether creating the client object succeeded */ - if (!client) { + if ((client = avahi_client_new(avahi_simple_poll_get(simple_poll), 0, client_callback, NULL, &error)) == NULL) { write_log(stderr, "Failed to create client: %s\n", avahi_strerror(error)); goto fail; } @@ -550,14 +547,14 @@ int main(int argc, char ** argv) { fail: /* Cleanup things */ - while(hosts->host != NULL) { + while (hosts->host != NULL) { free(hosts->host); tmphosts = hosts->next; free(hosts); hosts = tmphosts; } - while(ignore_interfaces->interface != NULL) { + while (ignore_interfaces->interface != NULL) { free(ignore_interfaces->interface); tmp_ignore_interfaces = ignore_interfaces->next; free(ignore_interfaces); |