summaryrefslogtreecommitdiffstats
path: root/pacredir.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-11-05 08:40:46 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-11-05 08:40:46 +0100
commit8551d4885a4bf5997e0aa97852719168ee8d5457 (patch)
tree65e14837f296b88355d5c9ce2fe8c43b4654784c /pacredir.c
parent8670d1284bb8ec42bb305680eac91a919b78ae3f (diff)
downloadpaccache-8551d4885a4bf5997e0aa97852719168ee8d5457.tar.gz
paccache-8551d4885a4bf5997e0aa97852719168ee8d5457.tar.zst
coding style cleanup
Diffstat (limited to 'pacredir.c')
-rw-r--r--pacredir.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/pacredir.c b/pacredir.c
index d889309..3d9760c 100644
--- a/pacredir.c
+++ b/pacredir.c
@@ -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);