Convert sizeof foo to sizeof(foo).
[tinc] / src / protocol_subnet.c
index 9ae491d..15ec8bf 100644 (file)
@@ -35,7 +35,7 @@
 bool send_add_subnet(connection_t *c, const subnet_t *subnet) {
        char netstr[MAXNETSTR];
 
-       if(!net2str(netstr, sizeof netstr, subnet))
+       if(!net2str(netstr, sizeof(netstr), subnet))
                return false;
 
        return send_request(c, "%d %x %s %s", ADD_SUBNET, rand(), subnet->owner->name, netstr);
@@ -45,7 +45,7 @@ bool add_subnet_h(connection_t *c) {
        char subnetstr[MAX_STRING_SIZE];
        char name[MAX_STRING_SIZE];
        node_t *owner;
-       subnet_t s = {0}, *new, *old;
+       subnet_t s = {NULL}, *new, *old;
 
        if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
                logger(LOG_ERR, "Got bad %s from %s (%s)", "ADD_SUBNET", c->name,
@@ -144,7 +144,7 @@ bool add_subnet_h(connection_t *c) {
 bool send_del_subnet(connection_t *c, const subnet_t *s) {
        char netstr[MAXNETSTR];
 
-       if(!net2str(netstr, sizeof netstr, s))
+       if(!net2str(netstr, sizeof(netstr), s))
                return false;
 
        return send_request(c, "%d %x %s %s", DEL_SUBNET, rand(), s->owner->name, netstr);
@@ -154,7 +154,7 @@ bool del_subnet_h(connection_t *c) {
        char subnetstr[MAX_STRING_SIZE];
        char name[MAX_STRING_SIZE];
        node_t *owner;
-       subnet_t s = {0}, *find;
+       subnet_t s = {NULL}, *find;
 
        if(sscanf(c->buffer, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
                logger(LOG_ERR, "Got bad %s from %s (%s)", "DEL_SUBNET", c->name,