You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2020/11/27 03:28:24 UTC

[incubator-nuttx-apps] branch master updated (0eac035 -> d1821c9)

This is an automated email from the ASF dual-hosted git repository.

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


    from 0eac035  examples/cctye: change std::isascii to isascii
     new 6520eb6  netutils/webserver/httpd.c: Fix syslog formats
     new e1cfa52  netutils/dhcpd/dhcpd.c: Fix syslog formats
     new d4f751f  netutils/thttpd/fdwatch.c: Replace a non-ascii character
     new 9aeade9  netutils/thttpd/fdwatch.c: Fix syslog formats
     new 92843ed  netutils/thttpd/thttpd.c: Replace a non-ascii character
     new c04f59c  netutils/thttpd/thttpd.c: Appease nxstyle
     new d1821c9  netutils/thttpd/thttpd.c: Fix syslog formats

The 7 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 netutils/dhcpd/dhcpd.c     | 19 ++++++++-----
 netutils/thttpd/fdwatch.c  |  6 ++--
 netutils/thttpd/thttpd.c   | 71 +++++++++++++++++++++++++++++-----------------
 netutils/webserver/httpd.c | 16 +++++------
 4 files changed, 68 insertions(+), 44 deletions(-)


[incubator-nuttx-apps] 07/07: netutils/thttpd/thttpd.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d1821c9bf0d46dbb464799af2095d4a229d5f9ca
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 20:01:36 2020 +0900

    netutils/thttpd/thttpd.c: Fix syslog formats
---
 netutils/thttpd/thttpd.c | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c
index ceaf450..a3b48da 100644
--- a/netutils/thttpd/thttpd.c
+++ b/netutils/thttpd/thttpd.c
@@ -44,6 +44,7 @@
 #include <sys/time.h>
 
 #include <stdbool.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
@@ -377,8 +378,8 @@ static void handle_read(struct connect_s *conn, struct timeval *tv)
   actual = lseek(hc->file_fd, conn->offset, SEEK_SET);
   if (actual != conn->offset)
     {
-       nerr("ERROR: fseek to %d failed: offset=%d errno=%d\n",
-            conn->offset, actual, errno);
+       nerr("ERROR: fseek to %jd failed: offset=%jd errno=%d\n",
+            (intmax_t)conn->offset, (intmax_t)actual, errno);
        BADREQUEST("lseek");
        goto errout_with_400;
     }
@@ -433,8 +434,10 @@ static void handle_send(struct connect_s *conn, struct timeval *tv)
 
   while (conn->offset < conn->end_offset)
     {
-      ninfo("offset: %d end_offset: %d bytes_sent: %d\n",
-            conn->offset, conn->end_offset, conn->hc->bytes_sent);
+      ninfo("offset: %jd end_offset: %jd bytes_sent: %jd\n",
+            (intmax_t)conn->offset,
+            (intmax_t)conn->end_offset,
+            (intmax_t)conn->hc->bytes_sent);
 
       /* Fill the rest of the response buffer with file data */
 


[incubator-nuttx-apps] 06/07: netutils/thttpd/thttpd.c: Appease nxstyle

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit c04f59cb2e6aff88e57e327128fb7df36723a09d
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:58:33 2020 +0900

    netutils/thttpd/thttpd.c: Appease nxstyle
    
    The following nxstyle errors are intentionally left.
    The first one is in the copyright notice.
    The others are identifiers like ClientData etc.
    
    netutils/thttpd/thttpd.c:10:81: error: Long line found
    netutils/thttpd/thttpd.c:99:2: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:100:2: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:131:17: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:131:57: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:132:36: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:133:52: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:134:23: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:134:63: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:527:2: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:597:17: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:597:57: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:608:14: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:615:38: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:620:14: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:625:37: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:632:36: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:633:52: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:643:23: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:643:63: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:730:35: error: Mixed case identifier found
    netutils/thttpd/thttpd.c:739:29: error: Mixed case identifier found
---
 netutils/thttpd/thttpd.c | 58 ++++++++++++++++++++++++++++++------------------
 1 file changed, 37 insertions(+), 21 deletions(-)

diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c
index 83d8a45..ceaf450 100644
--- a/netutils/thttpd/thttpd.c
+++ b/netutils/thttpd/thttpd.c
@@ -129,7 +129,8 @@ static void finish_connection(struct connect_s *conn, struct timeval *tv);
 static void clear_connection(struct connect_s *conn, struct timeval *tv);
 static void really_clear_connection(struct connect_s *conn);
 static void idle(ClientData client_data, struct timeval *nowP);
-static void linger_clear_connection(ClientData client_data, struct timeval *nowP);
+static void linger_clear_connection(ClientData client_data,
+                                    struct timeval *nowP);
 static void occasional(ClientData client_data, struct timeval *nowP);
 
 /****************************************************************************
@@ -163,6 +164,7 @@ static void shut_down(void)
         {
           fdwatch_del_fd(fw, ths->listen_fd);
         }
+
       httpd_terminate(ths);
     }
 
@@ -179,7 +181,7 @@ static int handle_newconnect(FAR struct timeval *tv, int listen_fd)
    */
 
   ninfo("New connection(s) on listen_fd %d\n", listen_fd);
-  for (;;)
+  for (; ; )
     {
       /* Get the next free connection from the free list */
 
@@ -269,12 +271,15 @@ static void handle_read(struct connect_s *conn, struct timeval *tv)
           BADREQUEST("MAXREALLOC");
           goto errout_with_400;
         }
-      httpd_realloc_str(&hc->read_buf, &hc->read_size, hc->read_size + CONFIG_THTTPD_REALLOCINCR);
+
+      httpd_realloc_str(&hc->read_buf, &hc->read_size,
+                        hc->read_size + CONFIG_THTTPD_REALLOCINCR);
     }
 
   /* Read some more bytes */
 
-  sz = read(hc->conn_fd, &(hc->read_buf[hc->read_idx]), hc->read_size - hc->read_idx);
+  sz = read(hc->conn_fd, &(hc->read_buf[hc->read_idx]),
+            hc->read_size - hc->read_idx);
   if (sz == 0)
     {
       BADREQUEST("EOF");
@@ -414,6 +419,7 @@ static inline int read_buffer(struct connect_s *conn)
           hc->buflen      += nread;
         }
     }
+
   return nread;
 }
 
@@ -438,6 +444,7 @@ static void handle_send(struct connect_s *conn, struct timeval *tv)
           nerr("ERROR: File read error: %d\n", errno);
           goto errout_clear_connection;
         }
+
       ninfo("Read %d bytes, buflen %d\n", nread, hc->buflen);
 
       /* Send the buffer */
@@ -488,7 +495,7 @@ static void handle_linger(struct connect_s *conn, struct timeval *tv)
   httpd_conn *hc = conn->hc;
   int ret;
 
-    /* In lingering-close mode we just read and ignore bytes.  An error or EOF
+  /* In lingering-close mode we just read and ignore bytes.  An error or EOF
    * ends things, otherwise we go until a timeout
    */
 
@@ -552,7 +559,8 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv)
       fdwatch_add_fd(fw, conn->hc->conn_fd, conn);
       client_data.p = conn;
 
-      conn->linger_timer = tmr_create(tv, linger_clear_connection, client_data,
+      conn->linger_timer = tmr_create(tv, linger_clear_connection,
+                                      client_data,
                                       CONFIG_THTTPD_LINGER_MSEC, 0);
       if (conn->linger_timer != NULL)
         {
@@ -562,7 +570,9 @@ static void clear_connection(struct connect_s *conn, struct timeval *tv)
       nerr("ERROR: tmr_create(linger_clear_connection) failed\n");
     }
 
-  /* Either we are done lingering, we shouldn't linger, or we failed to setup the linger */
+  /* Either we are done lingering, we shouldn't linger, or we failed to
+   * setup the linger
+   */
 
   really_clear_connection(conn);
 }
@@ -595,7 +605,8 @@ static void idle(ClientData client_data, struct timeval *nowP)
       switch (conn->conn_state)
         {
         case CNST_READING:
-          if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_READ_LIMIT_SEC)
+          if (nowP->tv_sec - conn->active_at >=
+              CONFIG_THTTPD_IDLE_READ_LIMIT_SEC)
             {
               nerr("ERROR: %s connection timed out reading\n",
                    httpd_ntoa(&conn->hc->client_addr));
@@ -606,7 +617,8 @@ static void idle(ClientData client_data, struct timeval *nowP)
           break;
 
         case CNST_SENDING:
-          if (nowP->tv_sec - conn->active_at >= CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC)
+          if (nowP->tv_sec - conn->active_at >=
+              CONFIG_THTTPD_IDLE_SEND_LIMIT_SEC)
             {
               nerr("ERROR: %s connection timed out sending\n",
                    httpd_ntoa(&conn->hc->client_addr));
@@ -617,7 +629,8 @@ static void idle(ClientData client_data, struct timeval *nowP)
     }
 }
 
-static void linger_clear_connection(ClientData client_data, struct timeval *nowP)
+static void linger_clear_connection(ClientData client_data,
+                                    struct timeval *nowP)
 {
   struct connect_s *conn;
 
@@ -714,7 +727,8 @@ int thttpd_main(int argc, char **argv)
 
   /* Set up the occasional timer */
 
-  if (tmr_create(NULL, occasional, JunkClientData, CONFIG_THTTPD_OCCASIONAL_MSEC * 1000L, 1) == NULL)
+  if (tmr_create(NULL, occasional, JunkClientData,
+      CONFIG_THTTPD_OCCASIONAL_MSEC * 1000L, 1) == NULL)
     {
       nerr("ERROR: tmr_create(occasional) failed\n");
       exit(1);
@@ -726,7 +740,6 @@ int thttpd_main(int argc, char **argv)
     {
       nerr("ERROR: tmr_create(idle) failed\n");
       exit(1);
-
     }
 
   /* Initialize our connections table */
@@ -745,8 +758,8 @@ int thttpd_main(int argc, char **argv)
       connects[cnum].hc          = NULL;
     }
 
-  connects[AVAILABLE_FDS-1].next = NULL;      /* End of link list */
-  free_connections               = connects;  /* Beginning of the link list */
+  connects[AVAILABLE_FDS - 1].next = NULL;      /* End of link list */
+  free_connections                 = connects;  /* Beginning of the link list */
 
   if (hs != NULL)
     {
@@ -760,7 +773,7 @@ int thttpd_main(int argc, char **argv)
 
   ninfo("Entering the main loop\n");
   gettimeofday(&tv, NULL);
-  for (;;)
+  for (; ; )
     {
       /* Do the fd watch */
 
@@ -805,7 +818,8 @@ int thttpd_main(int argc, char **argv)
 
       /* Find the connections that need servicing */
 
-      while ((conn = (struct connect_s*)fdwatch_get_next_client_data(fw)) != (struct connect_s*)-1)
+      while ((conn = (struct connect_s *)fdwatch_get_next_client_data(fw))
+             != (struct connect_s *)-1)
         {
           if (conn)
             {
@@ -819,8 +833,9 @@ int thttpd_main(int argc, char **argv)
                         {
                           handle_read(conn, &tv);
 
-                          /* If a GET request was received and a file is ready to
-                           * be sent, then fall through to send the file.
+                          /* If a GET request was received and a file is
+                           * ready to be sent, then fall through to send
+                           * the file.
                            */
 
                           if (conn->conn_state != CNST_SENDING)
@@ -831,9 +846,9 @@ int thttpd_main(int argc, char **argv)
 
                       case CNST_SENDING:
                         {
-                          /* Send a file -- this really should be performed on a
-                           * separate thread to keep the serve from locking up during
-                           * the write.
+                          /* Send a file -- this really should be performed
+                           * on a separate thread to keep the serve from
+                           * locking up during the write.
                            */
 
                           handle_send(conn, &tv);
@@ -851,6 +866,7 @@ int thttpd_main(int argc, char **argv)
                 }
             }
         }
+
       tmr_run(&tv);
     }
 


[incubator-nuttx-apps] 01/07: netutils/webserver/httpd.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 6520eb65b392bcf7b893b03c572d9e98332e63c1
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 11:52:51 2020 +0900

    netutils/webserver/httpd.c: Fix syslog formats
---
 netutils/webserver/httpd.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/netutils/webserver/httpd.c b/netutils/webserver/httpd.c
index 9330ed1..9e97d85 100644
--- a/netutils/webserver/httpd.c
+++ b/netutils/webserver/httpd.c
@@ -739,7 +739,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 
       if (o == pstate->ht_buffer + sizeof pstate->ht_buffer)
         {
-          nerr("ERROR: [%d] ht_buffer overflow\n");
+          nerr("ERROR: ht_buffer overflow\n");
           return 413;
         }
 
@@ -757,7 +757,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 #if CONFIG_NETUTILS_HTTPD_TIMEOUT > 0
           if (r == -1 && errno == EWOULDBLOCK)
             {
-              nwarn("WARNING: [%d] recv timeout\n");
+              nwarn("WARNING: recv timeout\n");
               return 408;
             }
 #endif
@@ -790,7 +790,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 
           if (*end != '\n')
             {
-              nwarn("WARNING: [%d] expected CRLF\n");
+              nwarn("WARNING: expected CRLF\n");
               return 400;
             }
 
@@ -803,7 +803,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
           case STATE_METHOD:
             if (0 != strncmp(start, "GET ", 4))
               {
-                nwarn("WARNING: [%d] method not supported\n");
+                nwarn("WARNING: method not supported\n");
                 return 501;
               }
 
@@ -812,7 +812,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 
             if (0 != strcmp(v, " HTTP/1.0") && 0 != strcmp(v, " HTTP/1.1"))
               {
-                nwarn("WARNING: [%d] HTTP version not supported\n");
+                nwarn("WARNING: HTTP version not supported\n");
                 return 505;
               }
 
@@ -820,7 +820,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 
             if (v - start >= sizeof pstate->ht_filename)
               {
-                nerr("ERROR: [%d] ht_filename overflow\n");
+                nerr("ERROR: ht_filename overflow\n");
                 return 414;
               }
 
@@ -845,7 +845,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 
             if (*start == '\0' || *v == '\0')
               {
-                nwarn("WARNING: [%d] header parse error\n");
+                nwarn("WARNING: header parse error\n");
                 return 400;
               }
 
@@ -854,7 +854,7 @@ static inline int httpd_parse(struct httpd_state *pstate)
 
             if (0 == strcasecmp(start, "Content-Length") && 0 != atoi(v))
               {
-                nwarn("WARNING: [%d] non-zero request length\n");
+                nwarn("WARNING: non-zero request length\n");
                 return 413;
               }
 #ifndef CONFIG_NETUTILS_HTTPD_KEEPALIVE_DISABLE


[incubator-nuttx-apps] 05/07: netutils/thttpd/thttpd.c: Replace a non-ascii character

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 92843ede9d54d247860cc05b56fafed739872a85
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:49:51 2020 +0900

    netutils/thttpd/thttpd.c: Replace a non-ascii character
    
    Replace a character (0xa9, which is the copyright sign in ISO 8859)
    with "(C)".
---
 netutils/thttpd/thttpd.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netutils/thttpd/thttpd.c b/netutils/thttpd/thttpd.c
index 5267035..83d8a45 100644
--- a/netutils/thttpd/thttpd.c
+++ b/netutils/thttpd/thttpd.c
@@ -7,7 +7,7 @@
  *
  * Derived from the file of the same name in the original THTTPD package:
  *
- *   Copyright � 1995,1998,1999,2000,2001 by Jef Poskanzer <je...@mail.acme.com>.
+ *   Copyright (C) 1995,1998,1999,2000,2001 by Jef Poskanzer <je...@mail.acme.com>.
  *   All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without


[incubator-nuttx-apps] 02/07: netutils/dhcpd/dhcpd.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e1cfa52efafb54b909ff3a471b32045b0ee86fa8
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 11:56:25 2020 +0900

    netutils/dhcpd/dhcpd.c: Fix syslog formats
---
 netutils/dhcpd/dhcpd.c | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/netutils/dhcpd/dhcpd.c b/netutils/dhcpd/dhcpd.c
index 13e9aee..494e60e 100644
--- a/netutils/dhcpd/dhcpd.c
+++ b/netutils/dhcpd/dhcpd.c
@@ -62,6 +62,7 @@
 #include <sys/socket.h>
 #include <sys/ioctl.h>
 
+#include <inttypes.h>
 #include <stdint.h>
 #include <stdbool.h>
 #include <string.h>
@@ -401,8 +402,8 @@ struct lease_s *dhcpd_setlease(const uint8_t *mac,
   int ndx = ipaddr - CONFIG_NETUTILS_DHCPD_STARTIP;
   struct lease_s *ret = NULL;
 
-  ninfo("ipaddr: %08x ipaddr: %08x ndx: %d MAX: %d\n",
-        ipaddr, CONFIG_NETUTILS_DHCPD_STARTIP, ndx,
+  ninfo("ipaddr: %08" PRIx32 " ipaddr: %08" PRIx32 " ndx: %d MAX: %d\n",
+        (uint32_t)ipaddr, (uint32_t)CONFIG_NETUTILS_DHCPD_STARTIP, ndx,
         CONFIG_NETUTILS_DHCPD_MAXLEASES);
 
   /* Verify that the address offset is within the supported range */
@@ -1267,8 +1268,11 @@ static inline int dhcpd_request(void)
        */
 
       ipaddr = dhcp_leaseipaddr(lease);
-      ninfo("Lease ipaddr: %08x Server IP: %08x Requested IP: %08x\n",
-            ipaddr, g_state.ds_optserverip, g_state.ds_optreqip);
+      ninfo("Lease ipaddr: %08" PRIx32 " Server IP: %08" PRIx32
+            " Requested IP: %08" PRIx32 "\n",
+            (uint32_t)ipaddr,
+            (uint32_t)g_state.ds_optserverip,
+            (uint32_t)g_state.ds_optreqip);
 
       if (g_state.ds_optserverip)
         {
@@ -1336,8 +1340,9 @@ static inline int dhcpd_request(void)
 
   else if (g_state.ds_optreqip && !g_state.ds_optserverip)
     {
-      ninfo("Server IP: %08x Requested IP: %08x\n",
-            g_state.ds_optserverip, g_state.ds_optreqip);
+      ninfo("Server IP: %08" PRIx32 " Requested IP: %08" PRIx32 "\n",
+            (uint32_t)g_state.ds_optserverip,
+            (uint32_t)g_state.ds_optreqip);
 
       /* Is this IP address already assigned? */
 
@@ -1674,7 +1679,7 @@ int dhcpd_start(FAR const char *interface)
           DEBUGASSERT(errval > 0);
 
           g_dhcpd_daemon.ds_state = DHCPD_STOPPED;
-          nerr("ERROR: Failed to start the DHCPD daemon\n", errval);
+          nerr("ERROR: Failed to start the DHCPD daemon: %d\n", errval);
           sem_post(&g_dhcpd_daemon.ds_lock);
           return -errval;
         }


[incubator-nuttx-apps] 03/07: netutils/thttpd/fdwatch.c: Replace a non-ascii character

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit d4f751f41fd1c6c9f6c9ef8417dcd3059d80a943
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:45:23 2020 +0900

    netutils/thttpd/fdwatch.c: Replace a non-ascii character
    
    Replace a character (0xa9, which is the copyright sign in ISO 8859)
    with "(C)".
---
 netutils/thttpd/fdwatch.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c
index 7890587..d0d08fb 100644
--- a/netutils/thttpd/fdwatch.c
+++ b/netutils/thttpd/fdwatch.c
@@ -7,7 +7,7 @@
  *
  * Derived from the file of the same name in the original THTTPD package:
  *
- *   Copyright � 1999,2000 by Jef Poskanzer <je...@mail.acme.com>.
+ *   Copyright (C) 1999,2000 by Jef Poskanzer <je...@mail.acme.com>.
  *   All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without


[incubator-nuttx-apps] 04/07: netutils/thttpd/fdwatch.c: Fix syslog formats

Posted by xi...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 9aeade97d539990a6d4273e363a6fb4ad4b56a87
Author: YAMAMOTO Takashi <ya...@midokura.com>
AuthorDate: Thu Nov 26 19:47:00 2020 +0900

    netutils/thttpd/fdwatch.c: Fix syslog formats
---
 netutils/thttpd/fdwatch.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/netutils/thttpd/fdwatch.c b/netutils/thttpd/fdwatch.c
index d0d08fb..c071ea6 100644
--- a/netutils/thttpd/fdwatch.c
+++ b/netutils/thttpd/fdwatch.c
@@ -123,7 +123,7 @@ static int fdwatch_pollndx(FAR struct fdwatch_s *fw, int fd)
         }
     }
 
-  fwerr("ERROR: No poll index for fd %d: %d\n", fd);
+  fwerr("ERROR: No poll index for fd %d\n", fd);
   return -1;
 }
 
@@ -275,7 +275,7 @@ int fdwatch(struct fdwatch_s *fw, long timeout_msecs)
    */
 
   fdwatch_dump("Before waiting:", fw);
-  fwinfo("Waiting... (timeout %d)\n", timeout_msecs);
+  fwinfo("Waiting... (timeout %ld)\n", timeout_msecs);
   fw->nactive = 0;
   fw->next    = 0;
   ret         = poll(fw->pollfds, fw->nwatched, (int)timeout_msecs);