nuttx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerpe...@apache.org
Subject [incubator-nuttx-apps] 02/02: wireless: gs2200m: Fix nxstyle warnings in gs2200m_main.c
Date Tue, 14 Apr 2020 09:22:18 GMT
This is an automated email from the ASF dual-hosted git repository.

jerpelea pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-nuttx-apps.git

commit efcbd2d842f69cc21998ce2735c943eb0f65c9c7
Author: Masayuki Ishikawa <masayuki.ishikawa@gmail.com>
AuthorDate: Tue Apr 14 17:24:19 2020 +0900

    wireless: gs2200m: Fix nxstyle warnings in gs2200m_main.c
    
    Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
---
 wireless/gs2200m/gs2200m_main.c | 120 ++++++++++++++++++----------------------
 1 file changed, 54 insertions(+), 66 deletions(-)

diff --git a/wireless/gs2200m/gs2200m_main.c b/wireless/gs2200m/gs2200m_main.c
index 1b7f29f..851231c 100644
--- a/wireless/gs2200m/gs2200m_main.c
+++ b/wireless/gs2200m/gs2200m_main.c
@@ -149,73 +149,61 @@ static const struct usrsock_req_handler_s
 {
   uint32_t hdrlen;
   int (CODE *fn)(int fd, FAR struct gs2200m_s *priv, FAR void *req);
-} handlers[USRSOCK_REQUEST__MAX] =
+}
+handlers[USRSOCK_REQUEST__MAX] =
+{
+{
+  sizeof(struct usrsock_request_socket_s),
+  socket_request,
+},
+{
+  sizeof(struct usrsock_request_close_s),
+  close_request,
+},
+{
+  sizeof(struct usrsock_request_connect_s),
+  connect_request,
+},
+{
+  sizeof(struct usrsock_request_sendto_s),
+  sendto_request,
+},
+{
+  sizeof(struct usrsock_request_recvfrom_s),
+  recvfrom_request,
+},
+{
+  sizeof(struct usrsock_request_setsockopt_s),
+  setsockopt_request,
+},
+{
+  sizeof(struct usrsock_request_getsockopt_s),
+  getsockopt_request,
+},
+{
+  sizeof(struct usrsock_request_getsockname_s),
+  getsockname_request,
+},
+{
+  sizeof(struct usrsock_request_getpeername_s),
+  getpeername_request,
+},
+{
+  sizeof(struct usrsock_request_bind_s),
+  bind_request,
+},
+{
+  sizeof(struct usrsock_request_listen_s),
+  listen_request,
+},
+{
+  sizeof(struct usrsock_request_accept_s),
+  accept_request,
+},
 {
-  [USRSOCK_REQUEST_SOCKET] =
-  {
-    sizeof(struct usrsock_request_socket_s),
-    socket_request,
-  },
-  [USRSOCK_REQUEST_CLOSE] =
-  {
-    sizeof(struct usrsock_request_close_s),
-    close_request,
-  },
-  [USRSOCK_REQUEST_CONNECT] =
-  {
-    sizeof(struct usrsock_request_connect_s),
-    connect_request,
-  },
-  [USRSOCK_REQUEST_SENDTO] =
-  {
-    sizeof(struct usrsock_request_sendto_s),
-    sendto_request,
-  },
-  [USRSOCK_REQUEST_RECVFROM] =
-  {
-    sizeof(struct usrsock_request_recvfrom_s),
-    recvfrom_request,
-  },
-  [USRSOCK_REQUEST_SETSOCKOPT] =
-  {
-    sizeof(struct usrsock_request_setsockopt_s),
-    setsockopt_request,
-  },
-  [USRSOCK_REQUEST_GETSOCKOPT] =
-  {
-    sizeof(struct usrsock_request_getsockopt_s),
-    getsockopt_request,
-  },
-  [USRSOCK_REQUEST_GETSOCKNAME] =
-  {
-    sizeof(struct usrsock_request_getsockname_s),
-    getsockname_request,
-  },
-  [USRSOCK_REQUEST_GETPEERNAME] =
-  {
-    sizeof(struct usrsock_request_getpeername_s),
-    getpeername_request,
-  },
-  [USRSOCK_REQUEST_BIND] =
-  {
-    sizeof(struct usrsock_request_bind_s),
-    bind_request,
-  },
-  [USRSOCK_REQUEST_LISTEN] =
-  {
-    sizeof(struct usrsock_request_listen_s),
-    listen_request,
-  },
-  [USRSOCK_REQUEST_ACCEPT] =
-  {
-    sizeof(struct usrsock_request_accept_s),
-    accept_request,
-  },
-  [USRSOCK_REQUEST_IOCTL] =
-  {
-    sizeof(struct usrsock_request_ioctl_s),
-    ioctl_request,
-  },
+  sizeof(struct usrsock_request_ioctl_s),
+  ioctl_request,
+},
 };
 
 static struct gs2200m_s *_daemon;


Mime
View raw message