Initialize variables in protocol_subnet.c
This commit is contained in:
parent
932dc76f43
commit
6b3b90a7b1
1 changed files with 6 additions and 2 deletions
|
@ -45,7 +45,9 @@ bool add_subnet_h(connection_t *c, const char *request) {
|
|||
char subnetstr[MAX_STRING_SIZE];
|
||||
char name[MAX_STRING_SIZE];
|
||||
node_t *owner;
|
||||
subnet_t s = {NULL}, *new, *old;
|
||||
subnet_t s, *new, *old;
|
||||
|
||||
memset(&s, 0x0, sizeof(subnet_t));
|
||||
|
||||
if(sscanf(request, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
||||
logger(DEBUG_ALWAYS, LOG_ERR, "Got bad %s from %s (%s)", "ADD_SUBNET", c->name,
|
||||
|
@ -155,7 +157,9 @@ bool del_subnet_h(connection_t *c, const char *request) {
|
|||
char subnetstr[MAX_STRING_SIZE];
|
||||
char name[MAX_STRING_SIZE];
|
||||
node_t *owner;
|
||||
subnet_t s = {NULL}, *find;
|
||||
subnet_t s, *find;
|
||||
|
||||
memset(&s, 0x0, sizeof(subnet_t));
|
||||
|
||||
if(sscanf(request, "%*d %*x " MAX_STRING " " MAX_STRING, name, subnetstr) != 2) {
|
||||
logger(DEBUG_ALWAYS, LOG_ERR, "Got bad %s from %s (%s)", "DEL_SUBNET", c->name,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue