1
0
mirror of git://projects.qi-hardware.com/ben-wpan.git synced 2024-11-22 12:59:21 +02:00

tools/lib/atrf.c (select_driver): fixed name length calculation

This commit is contained in:
Werner Almesberger 2011-04-09 22:38:46 -03:00
parent 54edf17a1e
commit 1175923df7

View File

@ -123,7 +123,7 @@ static const struct atrf_driver *select_driver(const char *arg,
end = strchr(arg, ':');
if (!end)
end = strchr(arg, 0);
len = arg-end;
len = end-arg;
for (drv = drivers; *drv; drv++)
if (!strncmp((*drv)->name, arg, len) &&
strlen((*drv)->name) == len)