summaryrefslogtreecommitdiffstats
path: root/src/hci.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/hci.c')
-rw-r--r--src/hci.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/hci.c b/src/hci.c
index fb7a2780..544607b9 100644
--- a/src/hci.c
+++ b/src/hci.c
@@ -74,8 +74,7 @@ static int hci_str2bit(hci_map *map, char *str, unsigned int *val)
hci_map *m;
int set;
- str = ptr = strdup(str);
- if (!str)
+ if (!str || !(str = ptr = strdup(str)))
return 0;
*val = set = 0;