mirror of
https://github.com/yarrick/iodine.git
synced 2025-12-31 05:36:11 +00:00
Initialize get_resolvconf_addr variable rv to NULL
Getting warning compiling for Android:
./util.c:35:6: warning: variable 'rv' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (sscanf(buf, "%15s", addr) == 1)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./util.c:79:9: note: uninitialized use occurs here
return rv;
^~
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
char *get_resolvconf_addr(void)
|
||||
{
|
||||
static char addr[16];
|
||||
char *rv;
|
||||
char *rv = NULL;
|
||||
#ifndef WINDOWS32
|
||||
char buf[80];
|
||||
FILE *fp;
|
||||
|
||||
Reference in New Issue
Block a user