mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-12-22 04:32:37 +01:00
t-runner: Check for NULL before using strcmp
This commit is contained in:
parent
e859e98869
commit
e3551ab56b
@ -2957,9 +2957,9 @@ int main(int argc, char *argv[])
|
||||
break;
|
||||
case 'g':
|
||||
gdb_opt = optarg;
|
||||
if (!(!strcmp(gdb_opt, "iwd") ||
|
||||
!strcmp(gdb_opt, "hostapd") ||
|
||||
!strcmp(gdb_opt, "hwsim"))) {
|
||||
if (!gdb_opt || (strcmp(gdb_opt, "iwd") &&
|
||||
strcmp(gdb_opt, "hostapd") &&
|
||||
strcmp(gdb_opt, "hwsim"))) {
|
||||
l_error("--gdb can only be used with iwd"
|
||||
", hwsim or hostapd");
|
||||
return EXIT_FAILURE;
|
||||
|
Loading…
Reference in New Issue
Block a user