mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2024-11-25 17:59:25 +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;
|
break;
|
||||||
case 'g':
|
case 'g':
|
||||||
gdb_opt = optarg;
|
gdb_opt = optarg;
|
||||||
if (!(!strcmp(gdb_opt, "iwd") ||
|
if (!gdb_opt || (strcmp(gdb_opt, "iwd") &&
|
||||||
!strcmp(gdb_opt, "hostapd") ||
|
strcmp(gdb_opt, "hostapd") &&
|
||||||
!strcmp(gdb_opt, "hwsim"))) {
|
strcmp(gdb_opt, "hwsim"))) {
|
||||||
l_error("--gdb can only be used with iwd"
|
l_error("--gdb can only be used with iwd"
|
||||||
", hwsim or hostapd");
|
", hwsim or hostapd");
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
|
Loading…
Reference in New Issue
Block a user