wapi: correct scan return value

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
This commit is contained in:
zhanghongyu 2022-04-08 19:34:21 +08:00 committed by Xiang Xiao
parent 8c8ebf4503
commit a755cb72da

View File

@ -1256,14 +1256,14 @@ int wapi_scan_stat(int sock, FAR const char *ifname)
return 1;
}
printf("err[%d]: %s\n", errno, strerror(errno));
}
else
{
int errcode = errno;
WAPI_IOCTL_STRERROR(SIOCGIWSCAN, errcode);
ret = -errcode;
}
else
{
ret = 0;
}
return ret;
}