mirror of
git://projects.qi-hardware.com/ben-wpan.git
synced 2025-04-21 12:27:27 +03:00
tools/lib/atrf.c (select_driver): fixed name length calculation
This commit is contained in:
@@ -123,7 +123,7 @@ static const struct atrf_driver *select_driver(const char *arg,
|
|||||||
end = strchr(arg, ':');
|
end = strchr(arg, ':');
|
||||||
if (!end)
|
if (!end)
|
||||||
end = strchr(arg, 0);
|
end = strchr(arg, 0);
|
||||||
len = arg-end;
|
len = end-arg;
|
||||||
for (drv = drivers; *drv; drv++)
|
for (drv = drivers; *drv; drv++)
|
||||||
if (!strncmp((*drv)->name, arg, len) &&
|
if (!strncmp((*drv)->name, arg, len) &&
|
||||||
strlen((*drv)->name) == len)
|
strlen((*drv)->name) == len)
|
||||||
|
|||||||
Reference in New Issue
Block a user