mirror of
https://github.com/apache/nuttx.git
synced 2026-05-30 05:16:47 +08:00
netdev/upperhalf: fix visual studio Compiler Error C2059
D:\archer\code\nuttx\drivers\net\netdev_upperhalf.c(557,5): error C2059: syntax error : '{'
Compiler error C2059:
The token caused a syntax error.
Reference:
https://learn.microsoft.com/en-us/cpp/error-messages/compiler-errors-1/compiler-error-c2059?view=msvc-170
Signed-off-by: chao an <anchao@xiaomi.com>
This commit is contained in:
@@ -552,9 +552,7 @@ int netdev_upper_wireless_ioctl(FAR struct netdev_lowerhalf_s *lower,
|
|||||||
int ret = -ENOTTY; /* Default to ENOTTY to indicate not serving. */
|
int ret = -ENOTTY; /* Default to ENOTTY to indicate not serving. */
|
||||||
FAR struct iwreq *iwr = (FAR struct iwreq *)arg;
|
FAR struct iwreq *iwr = (FAR struct iwreq *)arg;
|
||||||
FAR const struct wireless_ops_s *ops = lower->iw_ops;
|
FAR const struct wireless_ops_s *ops = lower->iw_ops;
|
||||||
const struct ether_addr zero =
|
struct ether_addr zero;
|
||||||
{
|
|
||||||
};
|
|
||||||
|
|
||||||
/* Decode and dispatch the driver-specific IOCTL command */
|
/* Decode and dispatch the driver-specific IOCTL command */
|
||||||
|
|
||||||
@@ -618,6 +616,7 @@ int netdev_upper_wireless_ioctl(FAR struct netdev_lowerhalf_s *lower,
|
|||||||
case SIOCSIWAP: /* Set access point MAC addresses */
|
case SIOCSIWAP: /* Set access point MAC addresses */
|
||||||
if (ops->bssid)
|
if (ops->bssid)
|
||||||
{
|
{
|
||||||
|
memset(&zero, 0, sizeof(zero));
|
||||||
if (memcmp(iwr->u.ap_addr.sa_data, &zero, sizeof(zero)) != 0)
|
if (memcmp(iwr->u.ap_addr.sa_data, &zero, sizeof(zero)) != 0)
|
||||||
{
|
{
|
||||||
ret = ops->bssid(lower, iwr, true);
|
ret = ops->bssid(lower, iwr, true);
|
||||||
|
|||||||
Reference in New Issue
Block a user