Commit: 37f1b609ae88f16e0e978836dd0afb245eb0d24c
Parent: 7ce750c3e46b298c40d4e7e000f30c175bf365b1
Author: Anderson Lizardo <anderson.lizardo@openbossa.org>
Committer: Johan Hedberg <johan.hedberg@intel.com>
Date: 2014-01-06 21:22:28
Tree: 00cbe43d7700b8c587109a51aaba0e8c18dadc5a

android/client: Fix uninitialized "sock_fd" variable If EXEC() macro is called with the first pointer argument NULL, sock_fd will not be initialized. Given that the NULL check is not fatal, it is a good idea to initialize the variable to -1 so the code has defined behavior on this situation. Detected by clang: android/client/if-sock.c:251:7: error: variable 'sock_fd' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]

Diffstat

M android/client/if-sock.c | 4 ++- -

1 files changed, 2 insertions(+), 2 deletions(-)

View Full Diff | Patch