From: Florian Forster Date: Fri, 9 Apr 2010 20:20:42 +0000 (+0200) Subject: pinba plugin: Coding style changes. X-Git-Tag: collectd-4.10.0~7^2~6 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=5ad4472bd53ab4c07f8e12719fc242468aac9896;p=collectd.git pinba plugin: Coding style changes. --- diff --git a/src/pinba.c b/src/pinba.c index da54e9d5..a00720f1 100644 --- a/src/pinba.c +++ b/src/pinba.c @@ -186,10 +186,10 @@ static void service_statnode_add(const char *name, /* {{{ */ node->mem_peak = NAN; /* fill query data */ - strset(&node->name, name); - strset(&node->host, host); - strset(&node->server, server); - strset(&node->script, script); + strset (&node->name, name); + strset (&node->host, host); + strset (&node->server, server); + strset (&node->script, script); /* increment counter */ stat_nodes_num++; @@ -251,11 +251,16 @@ static void service_process_request (Pinba__Request *request) /* {{{ */ for (i = 0; i < stat_nodes_num; i++) { - if(stat_nodes[i].host && strcmp(request->hostname, stat_nodes[i].host)) + if ((stat_nodes[i].host != NULL) + && (strcmp (request->hostname, stat_nodes[i].host) != 0)) continue; - if(stat_nodes[i].server && strcmp(request->server_name, stat_nodes[i].server)) + + if ((stat_nodes[i].server != NULL) + && (strcmp (request->server_name, stat_nodes[i].server) != 0)) continue; - if(stat_nodes[i].script && strcmp(request->script_name, stat_nodes[i].script)) + + if ((stat_nodes[i].script != NULL) + && (strcmp (request->script_name, stat_nodes[i].script) != 0)) continue; service_statnode_process(&stat_nodes[i], request);