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/04/12 18:09:42 UTC

[incubator-nuttx] branch master updated (c3b0848 -> 759d8c1)

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.git.


    from c3b0848  misc/Kconfig: enable LIBC_IOCTL_VARIADIC by default
     new 62c1389  Fix warnings noted in PR build checks:
     new 2aabf76  Run nxstyle against modified files in PR
     new ca2b0a3  Fix more warnings noted in PR checks
     new 759d8c1  Run nxstyle against files modified in previous commit.

The 4 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:
 drivers/net/telnet.c                               |  22 ++-
 drivers/rwbuffer.c                                 |  10 +-
 fs/vfs/fs_link.c                                   |   2 +-
 include/nuttx/net/bluetooth.h                      |  46 ++---
 include/nuttx/wireless/ieee802154/ieee802154_mac.h | 195 +++++++++++----------
 libs/libc/time/lib_localtime.c                     | 133 ++++++++------
 libs/libdsp/lib_misc.c                             |   4 -
 libs/libnx/nxfonts/nxfonts_cache.c                 |  77 ++++----
 net/arp/arp_notify.c                               |  47 ++---
 net/icmpv6/icmpv6_notify.c                         |  51 ++----
 net/icmpv6/icmpv6_rnotify.c                        |  48 ++---
 net/sixlowpan/sixlowpan_internal.h                 |  72 ++++----
 net/sixlowpan/sixlowpan_send.c                     |  62 +++----
 net/sixlowpan/sixlowpan_tcpsend.c                  |  93 +++++-----
 net/sixlowpan/sixlowpan_udpsend.c                  |  50 ++----
 15 files changed, 434 insertions(+), 478 deletions(-)


[incubator-nuttx] 02/04: Run nxstyle against modified files in PR

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.git

commit 2aabf768151ac626a2de8b82597eca0ba2da696e
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sun Apr 12 10:09:04 2020 -0600

    Run nxstyle against modified files in PR
---
 drivers/net/telnet.c           |  20 +++++--
 libs/libc/time/lib_localtime.c | 131 +++++++++++++++++++++++++----------------
 2 files changed, 95 insertions(+), 56 deletions(-)

diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c
index 493e958..268f874 100644
--- a/drivers/net/telnet.c
+++ b/drivers/net/telnet.c
@@ -295,7 +295,9 @@ static void telnet_check_ctrlchar(FAR struct telnet_dev_s *priv,
   for (; priv->td_pid >= 0 && len > 0; buffer++, len--)
     {
 #ifdef CONFIG_TTY_SIGINT
-      /* Is this the special character that will generate the SIGINT signal? */
+      /* Is this the special character that will generate the SIGINT
+       * signal?
+       */
 
       if (*buffer == CONFIG_TTY_SIGINT_CHAR)
         {
@@ -309,7 +311,9 @@ static void telnet_check_ctrlchar(FAR struct telnet_dev_s *priv,
 #endif
 
 #ifdef CONFIG_TTY_SIGSTP
-      /* Is this the special character that will generate the SIGSTP signal? */
+      /* Is this the special character that will generate the SIGSTP
+       * signal?
+       */
 
       if (*buffer == CONFIG_TTY_SIGSTP_CHAR)
         {
@@ -459,7 +463,9 @@ static ssize_t telnet_receive(FAR struct telnet_dev_s *priv,
 #ifdef CONFIG_TELNET_CHARACTER_MODE
             if (ch == TELNET_SGA || ch == TELNET_ECHO)
               {
-                /* If it received 'ECHO' or 'Suppress Go Ahead', then do nothing */
+                /* If it received 'ECHO' or 'Suppress Go Ahead', then do
+                 * nothing.
+                 */
               }
             else
               {
@@ -587,7 +593,9 @@ static bool telnet_putchar(FAR struct telnet_dev_s *priv, uint8_t ch,
   register int index;
   bool ret = false;
 
-  /* Ignore carriage returns (we will put these in automatically as necessary) */
+  /* Ignore carriage returns (we will put these in automatically as
+   * necessary).
+   */
 
   if (ch != TELNET_CR)
     {
@@ -1166,7 +1174,9 @@ static int telnet_ioctl(FAR struct file *filep, int cmd, unsigned long arg)
   switch (cmd)
     {
 #ifdef HAVE_SIGNALS
-      /* Make the given terminal the controlling terminal of the calling process */
+      /* Make the given terminal the controlling terminal of the calling
+       * process.
+       */
 
     case TIOCSCTTY:
       {
diff --git a/libs/libc/time/lib_localtime.c b/libs/libc/time/lib_localtime.c
index e2c411a..e784d52 100644
--- a/libs/libc/time/lib_localtime.c
+++ b/libs/libc/time/lib_localtime.c
@@ -63,7 +63,9 @@
 /****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
+
 /* Time zone object file directory */
 
 #ifdef CONFIG_LIBC_TZDIR
@@ -125,7 +127,8 @@
 
 #define isleap(y)           (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
 
-/* Since everything in isleap is modulo 400 (or a factor of 400), we know that
+/* Since everything in isleap is modulo 400 (or a factor of 400), we know
+ * that
  *    isleap(y) == isleap(y % 400)
  * and so
  *    isleap(a + b) == isleap((a + b) % 400)
@@ -280,7 +283,8 @@ struct state_s
   time_t ats[TZ_MAX_TIMES];
   unsigned char types[TZ_MAX_TIMES];
   struct ttinfo_s ttis[TZ_MAX_TYPES];
-  char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, GMTLEN), (2 * (MY_TZNAME_MAX + 1)))];
+  char chars[BIGGEST(BIGGEST(TZ_MAX_CHARS + 1, GMTLEN),
+                    (2 * (MY_TZNAME_MAX + 1)))];
   struct lsinfo_s lsis[TZ_MAX_LEAPS];
   int defaulttype;            /* For early times or if no transitions */
 };
@@ -302,13 +306,13 @@ struct rule_s
 
 static time_t const g_min_timet =
   (TYPE_SIGNED(time_t)
-   ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)
-   : 0);
+    ? (time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1)
+    : 0);
 
 static time_t const g_max_timet =
   (TYPE_SIGNED(time_t)
-   ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1))
-   : -1);
+    ? - (~ 0 < 0) - ((time_t) -1 << (CHAR_BIT * sizeof (time_t) - 1))
+    : -1);
 
 static const char g_wildabbr[] = WILDABBR;
 
@@ -359,7 +363,8 @@ static FAR const char *getzname(FAR const char *strp);
 static FAR const char *getqzname(FAR const char *strp, const int delim);
 static FAR const char *getnum(FAR const char *strp, FAR int *nump,
               int min, int max);
-static FAR const char *getsecs(FAR const char *strp, FAR int_fast32_t *secsp);
+static FAR const char *getsecs(FAR const char *strp,
+              FAR int_fast32_t *secsp);
 static FAR const char *getoffset(FAR const char *strp,
               FAR int_fast32_t *offsetp);
 static FAR const char *getrule(FAR const char *strp,
@@ -375,7 +380,8 @@ static int  increment_overflow32(FAR int_fast32_t * number, int delta);
 static int  increment_overflow_time(time_t * t, int_fast32_t delta);
 static int  normalize_overflow32(FAR int_fast32_t * tensptr,
               FAR int *unitsptr, int base);
-static int  normalize_overflow(FAR int *tensptr, FAR int *unitsptr, int base);
+static int  normalize_overflow(FAR int *tensptr, FAR int *unitsptr,
+              int base);
 static void settzname(void);
 static time_t time1(FAR struct tm *tmp,
               FAR struct tm *(*funcp)(FAR const time_t *, int_fast32_t,
@@ -508,18 +514,20 @@ static int tzload(FAR const char *name,
   typedef union
   {
     struct tzhead_s tzhead_s;
-    char buf[2 * sizeof(struct tzhead_s) + 2 * sizeof *sp + 4 * TZ_MAX_TIMES];
+    char buf[2 * sizeof(struct tzhead_s) +
+             2 * sizeof *sp +
+             4 * TZ_MAX_TIMES];
   } u_t;
 
+  /* Section 4.9.1 of the C standard says that
+   * "FILENAME_MAX expands to an integral constant expression
+   * that is the size needed for an array of char large enough
+   * to hold the longest file name string that the implementation
+   * guarantees can be opened."
+   */
+
   union local_storage
   {
-    /* Section 4.9.1 of the C standard says that
-     * "FILENAME_MAX expands to an integral constant expression
-     * that is the size needed for an array of char large enough
-     * to hold the longest file name string that the implementation
-     * guarantees can be opened."
-     */
-
     char fullname[FILENAME_MAX + 1];
 
     /* The main part of the storage for this function.  */
@@ -626,13 +634,13 @@ static int tzload(FAR const char *name,
           goto oops;
         }
 
-      if (nread - (p - up->buf) < sp->timecnt * stored +        /* ats */
-          sp->timecnt +         /* types */
-          sp->typecnt * 6 +     /* ttinfos */
-          sp->charcnt +         /* chars */
-          sp->leapcnt * (stored + 4) +  /* lsinfos */
-          ttisstdcnt +          /* ttisstds */
-          ttisgmtcnt)           /* ttisgmts */
+      if (nread - (p - up->buf) < sp->timecnt * stored + /* ats */
+          sp->timecnt +                                  /* types */
+          sp->typecnt * 6 +                              /* ttinfos */
+          sp->charcnt +                                  /* chars */
+          sp->leapcnt * (stored + 4) +                   /* lsinfos */
+          ttisstdcnt +                                   /* ttisstds */
+          ttisgmtcnt)                                    /* ttisgmts */
         {
           goto oops;
         }
@@ -642,7 +650,8 @@ static int tzload(FAR const char *name,
         {
           int_fast64_t at = stored == 4 ? detzcode(p) : detzcode64(p);
           sp->types[i] = ((TYPE_SIGNED(time_t)
-                           ? g_min_timet <= at : 0 <= at) && at <= g_max_timet);
+                           ? g_min_timet <= at : 0 <= at) &&
+                           at <= g_max_timet);
           if (sp->types[i])
             {
               if (i && !timecnt && at != g_min_timet)
@@ -896,7 +905,8 @@ oops:
   return -1;
 }
 
-static int typesequiv(FAR const struct state_s *const sp, const int a, const int b)
+static int typesequiv(FAR const struct state_s *const sp, const int a,
+                      const int b)
 {
   int result;
 
@@ -918,8 +928,8 @@ static int typesequiv(FAR const struct state_s *const sp, const int a, const int
   return result;
 }
 
-/* Given a pointer into a time zone string, scan until a character that is not
- * a valid character in a zone name is found. Return a pointer to that
+/* Given a pointer into a time zone string, scan until a character that is
+ * not a valid character in a zone name is found. Return a pointer to that
  * character.
  */
 
@@ -927,7 +937,8 @@ static FAR const char *getzname(FAR const char *strp)
 {
   char c;
 
-  while ((c = *strp) != '\0' && !is_digit(c) && c != ',' && c != '-' && c != '+')
+  while ((c = *strp) != '\0' && !is_digit(c) && c != ',' &&
+         c != '-' && c != '+')
     {
       ++strp;
     }
@@ -955,10 +966,10 @@ static FAR const char *getqzname(FAR const char *strp, const int delim)
   return strp;
 }
 
-/* Given a pointer into a time zone string, extract a number from that string.
- * Check that the number is within a specified range; if it is not, return
- * NULL.
- * Otherwise, return a pointer to the first character not part of the number.
+/* Given a pointer into a time zone string, extract a number from that
+ * string.  Check that the number is within a specified range; if it is not,
+ * return NULL.  Otherwise, return a pointer to the first character not part
+ * of the number.
  */
 
 static FAR const char *getnum(FAR const char *strp, FAR int *const nump,
@@ -1180,6 +1191,7 @@ static int_fast32_t transtime(const int year,
   switch (rulep->r_type)
     {
     case JULIAN_DAY:
+
       /* Jn - Julian day, 1 == January 1, 60 == March 1 even in leap
        * years.
        * In non-leap years, or if the day number is 59 or less, just
@@ -1189,10 +1201,14 @@ static int_fast32_t transtime(const int year,
 
       value = (rulep->r_day - 1) * SECSPERDAY;
       if (leapyear && rulep->r_day >= 60)
-        value += SECSPERDAY;
+        {
+          value += SECSPERDAY;
+        }
+
       break;
 
     case DAY_OF_YEAR:
+
       /* n - day of year.
        * Just add SECSPERDAY times the day number to the time of
        * January 1, midnight, to get the day.
@@ -1202,6 +1218,7 @@ static int_fast32_t transtime(const int year,
       break;
 
     case MONTH_NTH_DAY_OF_WEEK:
+
       /* Mm.n.d - nth "dth day" of month m */
 
       /* Use Zeller's Congruence to get day-of-week of first day of
@@ -1307,6 +1324,7 @@ static int tzparse(FAR const char *name, FAR struct state_s *const sp,
           name = getzname(name);
           stdlen = name - stdname;
         }
+
       if (*name == '\0')
         {
           return -1;
@@ -1412,9 +1430,12 @@ static int tzparse(FAR const char *name, FAR struct state_s *const sp,
           for (year = EPOCH_YEAR; year < yearlim; year++)
             {
               int_fast32_t
-                starttime = transtime(year, &start, stdoffset),
-                endtime = transtime(year, &end, dstoffset);
-              int_fast32_t yearsecs = (g_year_lengths[isleap(year)] * SECSPERDAY);
+                starttime  = transtime(year, &start, stdoffset);
+              int_fast32_t
+                endtime    = transtime(year, &end, dstoffset);
+              int_fast32_t
+                yearsecs   = (g_year_lengths[isleap(year)] * SECSPERDAY);
+
               int reversed = endtime < starttime;
               if (reversed)
                 {
@@ -1425,7 +1446,8 @@ static int tzparse(FAR const char *name, FAR struct state_s *const sp,
 
               if (reversed ||
                    (starttime < endtime &&
-                    (endtime - starttime < (yearsecs + (stdoffset - dstoffset)))))
+                    (endtime - starttime <
+                     (yearsecs + (stdoffset - dstoffset)))))
                 {
                   if (TZ_MAX_TIMES - 2 < timecnt)
                     {
@@ -1764,8 +1786,8 @@ static struct tm *localsub(FAR const time_t * const timep,
 
 /* gmtsub is to gmtime as localsub is to localtime */
 
-static struct tm *gmtsub(FAR const time_t * const timep, const int_fast32_t offset,
-                         struct tm *const tmp)
+static struct tm *gmtsub(FAR const time_t * const timep,
+                         const int_fast32_t offset, struct tm *const tmp)
 {
   if (!g_gmt_isset)
     {
@@ -1846,7 +1868,8 @@ static struct tm *timesub(FAR const time_t * const timep,
       int leapdays;
 
       tdelta = tdays / DAYSPERLYEAR;
-      if (!((!TYPE_SIGNED(time_t) || INT_MIN <= tdelta) && tdelta <= INT_MAX))
+      if (!((!TYPE_SIGNED(time_t) || INT_MIN <= tdelta) &&
+          tdelta <= INT_MAX))
         {
           return NULL;
         }
@@ -1869,13 +1892,13 @@ static struct tm *timesub(FAR const time_t * const timep,
       y = newy;
     }
 
-  {
-    int_fast32_t seconds;
+    {
+      int_fast32_t seconds;
 
-    seconds = tdays * SECSPERDAY;
-    tdays = seconds / SECSPERDAY;
-    rem += seconds - tdays * SECSPERDAY;
-  }
+      seconds = tdays * SECSPERDAY;
+      tdays = seconds / SECSPERDAY;
+      rem += seconds - tdays * SECSPERDAY;
+    }
 
   /* Given the range, we can now fearlessly cast */
 
@@ -1896,7 +1919,10 @@ static struct tm *timesub(FAR const time_t * const timep,
   while (idays < 0)
     {
       if (increment_overflow(&y, -1))
-        return NULL;
+        {
+          return NULL;
+        }
+
       idays += g_year_lengths[isleap(y)];
     }
 
@@ -2054,7 +2080,7 @@ static int tmcomp(FAR const struct tm *atmp, FAR const struct tm *btmp)
 
 static time_t time2sub(struct tm *const tmp,
                        FAR struct tm *(*const funcp)(FAR const time_t *,
-                                                     int_fast32_t, struct tm *),
+                       int_fast32_t, struct tm *),
                        const int_fast32_t offset, FAR int *const okayp,
                        const int do_norm_secs)
 {
@@ -2279,7 +2305,8 @@ static time_t time2sub(struct tm *const tmp,
        * gets checked.
        */
 
-      sp = (FAR const struct state_s *)((funcp == localsub) ? lclptr : gmtptr);
+      sp = (FAR const struct state_s *)
+        ((funcp == localsub) ? lclptr : gmtptr);
       if (sp == NULL)
         {
           return -1;
@@ -2437,7 +2464,8 @@ static time_t time1(FAR struct tm *const tmp,
               continue;
             }
 
-          tmp->tm_sec += sp->ttis[otheri].tt_gmtoff - sp->ttis[samei].tt_gmtoff;
+          tmp->tm_sec  += sp->ttis[otheri].tt_gmtoff -
+                          sp->ttis[samei].tt_gmtoff;
           tmp->tm_isdst = !tmp->tm_isdst;
           t = time2(tmp, funcp, offset, &okay);
           if (okay)
@@ -2445,7 +2473,8 @@ static time_t time1(FAR struct tm *const tmp,
               return t;
             }
 
-          tmp->tm_sec -= sp->ttis[otheri].tt_gmtoff - sp->ttis[samei].tt_gmtoff;
+          tmp->tm_sec  -= sp->ttis[otheri].tt_gmtoff -
+                          sp->ttis[samei].tt_gmtoff;
           tmp->tm_isdst = !tmp->tm_isdst;
         }
     }


[incubator-nuttx] 03/04: Fix more warnings noted in PR checks

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.git

commit ca2b0a3657a0f1756aa67ecd0fb3c6390d38d567
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sun Apr 12 10:46:40 2020 -0600

    Fix more warnings noted in PR checks
    
        arp/arp_notify.c:132:43: warning: for loop has empty body [-Wempty-body]
               prev = curr, curr = curr->nt_flink);
                                                  ^
    
        sixlowpan/sixlowpan_tcpsend.c:806:31: warning: implicit conversion from 'unsigned int' to 'uint16_t' (aka 'unsigned short') changes value from 4294967295 to 65535 [-Wconstant-conversion]
                                      _SO_TIMEOUT(psock->s_sndtimeo));
                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
    Numerous warnings like:
    
        ieee802154_getreq.c:93:3: warning: implicit declaration of function 'memcpy' is invalid in C99 [-Wimplicit-function-declaration]
          IEEE802154_EADDRCOPY(eaddr, req.attrval.mac.eaddr);
          ^
    
        nxfonts/nxfonts_cache.c:839:35: warning: for loop has empty body [-Wempty-body]
                   fcache = fcache->flink);
    
        bluetooth/bluetooth_finddev.c:100:11: warning: implicit declaration of function 'memcmp' is invalid in C99 [-Wimplicit-function-declaration]
              if (BLUETOOTH_ADDRCMP(dev->d_mac.radio.nv_addr, match->bf_addr))
                  ^
    
        rwbuffer.c:559:7: warning: variable 'ret' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
          if (rwb->rhmaxblocks > 0 && rwb->rhnblocks > 0)
              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
 drivers/rwbuffer.c                                 |  2 +-
 fs/vfs/fs_link.c                                   |  2 +-
 include/nuttx/net/bluetooth.h                      | 40 ++++++------------
 include/nuttx/wireless/ieee802154/ieee802154_mac.h |  3 ++
 libs/libdsp/lib_misc.c                             |  4 --
 libs/libnx/nxfonts/nxfonts_cache.c                 | 47 ++++++++--------------
 net/arp/arp_notify.c                               | 47 ++++++++--------------
 net/icmpv6/icmpv6_notify.c                         | 47 ++++++++--------------
 net/icmpv6/icmpv6_rnotify.c                        | 43 +++++++-------------
 net/sixlowpan/sixlowpan_internal.h                 |  2 +-
 net/sixlowpan/sixlowpan_send.c                     | 41 ++++++-------------
 net/sixlowpan/sixlowpan_tcpsend.c                  | 45 +++++++--------------
 net/sixlowpan/sixlowpan_udpsend.c                  | 39 ++++++------------
 13 files changed, 125 insertions(+), 237 deletions(-)

diff --git a/drivers/rwbuffer.c b/drivers/rwbuffer.c
index f7b0972..8ab204e 100644
--- a/drivers/rwbuffer.c
+++ b/drivers/rwbuffer.c
@@ -554,7 +554,7 @@ int rwb_invalidate_writebuffer(FAR struct rwbuffer_s *rwb,
 int rwb_invalidate_readahead(FAR struct rwbuffer_s *rwb,
                              off_t startblock, size_t blockcount)
 {
-  int ret;
+  int ret = OK;
 
   if (rwb->rhmaxblocks > 0 && rwb->rhnblocks > 0)
     {
diff --git a/fs/vfs/fs_link.c b/fs/vfs/fs_link.c
index 81294b3..25916c6 100644
--- a/fs/vfs/fs_link.c
+++ b/fs/vfs/fs_link.c
@@ -75,7 +75,7 @@
 int link(FAR const char *path1, FAR const char *path2)
 {
   struct inode_search_s desc;
-  FAR struct inode *inode;
+  FAR struct inode *inode = NULL;
   int errcode;
   int ret;
 
diff --git a/include/nuttx/net/bluetooth.h b/include/nuttx/net/bluetooth.h
index 3f0dc01..7ce61a3 100644
--- a/include/nuttx/net/bluetooth.h
+++ b/include/nuttx/net/bluetooth.h
@@ -1,35 +1,20 @@
 /****************************************************************************
  * include/nuttx/net/bluetooth.h
  *
- *   Copyright (C) 2018 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -41,6 +26,7 @@
  ****************************************************************************/
 
 #include <nuttx/config.h>
+#include <string.h>
 #include <nuttx/wireless/bluetooth/bt_hci.h>
 
 #ifdef CONFIG_NET_BLUETOOTH
diff --git a/include/nuttx/wireless/ieee802154/ieee802154_mac.h b/include/nuttx/wireless/ieee802154/ieee802154_mac.h
index 8b35c36..c137803 100644
--- a/include/nuttx/wireless/ieee802154/ieee802154_mac.h
+++ b/include/nuttx/wireless/ieee802154/ieee802154_mac.h
@@ -51,6 +51,7 @@
 #include <signal.h>
 #include <stdint.h>
 #include <stdbool.h>
+#include <string.h>
 
 #if defined(CONFIG_NET_6LOWPAN) || defined(CONFIG_NET_IEEE802154)
 #  include <net/if.h>
@@ -61,6 +62,7 @@
 /****************************************************************************
  * Pre-Processor Definitions
  ****************************************************************************/
+
 /* Configuration ************************************************************/
 
 #if !defined(CONFIG_MAC802154_NPANDESC) || CONFIG_MAC802154_NPANDESC <= 0
@@ -71,6 +73,7 @@
 #define MAC802154_NPANDESC CONFIG_MAC802154_NPANDESC
 
 /* IEEE 802.15.4 address macros */
+
 /* Copy a an IEEE 802.15.4 address */
 
 #define IEEE802154_ANYADDRCOPY(dest,src,len) \
diff --git a/libs/libdsp/lib_misc.c b/libs/libdsp/lib_misc.c
index 67e3fe3..52a1f07 100644
--- a/libs/libdsp/lib_misc.c
+++ b/libs/libdsp/lib_misc.c
@@ -371,10 +371,6 @@ float fast_atan2(float y, float x)
     {
       angle = -angle;
     }
-  else
-    {
-      angle = angle;
-    }
 
   return angle;
 }
diff --git a/libs/libnx/nxfonts/nxfonts_cache.c b/libs/libnx/nxfonts/nxfonts_cache.c
index ab6fbbc..c2ad01a 100644
--- a/libs/libnx/nxfonts/nxfonts_cache.c
+++ b/libs/libnx/nxfonts/nxfonts_cache.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libnx/nxfonts/nxfonts_cache.c
  *
- *   Copyright (C) 2017, 2019 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -836,7 +821,9 @@ void nxf_cache_disconnect(FCACHE fhandle)
 
       for (prev = NULL, fcache = g_fcaches;
            fcache != priv && fcache != NULL;
-           fcache = fcache->flink);
+           fcache = fcache->flink)
+        {
+        }
 
       DEBUGASSERT(fcache == priv);
       nxf_removecache(fcache, prev);
diff --git a/net/arp/arp_notify.c b/net/arp/arp_notify.c
index 4cbd2b0..4bba3b4 100644
--- a/net/arp/arp_notify.c
+++ b/net/arp/arp_notify.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * net/arp/arp_notify.c
  *
- *   Copyright (C) 2014, 2016 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -129,7 +114,9 @@ int arp_wait_cancel(FAR struct arp_notify_s *notify)
   flags = enter_critical_section();
   for (prev = NULL, curr = g_arp_waiters;
        curr && curr != notify;
-       prev = curr, curr = curr->nt_flink);
+       prev = curr, curr = curr->nt_flink)
+    {
+    }
 
   DEBUGASSERT(curr && curr == notify);
   if (curr)
diff --git a/net/icmpv6/icmpv6_notify.c b/net/icmpv6/icmpv6_notify.c
index a394a06..b131965 100644
--- a/net/icmpv6/icmpv6_notify.c
+++ b/net/icmpv6/icmpv6_notify.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * net/icmpv6/icmpv6_notify.c
  *
- *   Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -143,7 +128,9 @@ int icmpv6_wait_cancel(FAR struct icmpv6_notify_s *notify)
   flags = enter_critical_section();
   for (prev = NULL, curr = g_icmpv6_waiters;
        curr && curr != notify;
-       prev = curr, curr = curr->nt_flink);
+       prev = curr, curr = curr->nt_flink)
+    {
+    }
 
   DEBUGASSERT(curr && curr == notify);
   if (curr)
diff --git a/net/icmpv6/icmpv6_rnotify.c b/net/icmpv6/icmpv6_rnotify.c
index e69be2a..9172b7b 100644
--- a/net/icmpv6/icmpv6_rnotify.c
+++ b/net/icmpv6/icmpv6_rnotify.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * net/icmpv6/icmpv6_rnotify.c
  *
- *   Copyright (C) 2015-2016 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -227,7 +212,9 @@ int icmpv6_rwait_cancel(FAR struct icmpv6_rnotify_s *notify)
   flags = enter_critical_section();
   for (prev = NULL, curr = g_icmpv6_rwaiters;
        curr && curr != notify;
-       prev = curr, curr = curr->rn_flink);
+       prev = curr, curr = curr->rn_flink)
+    {
+    }
 
   DEBUGASSERT(curr && curr == notify);
   if (curr)
diff --git a/net/sixlowpan/sixlowpan_internal.h b/net/sixlowpan/sixlowpan_internal.h
index b1e73f1..edbb90e 100644
--- a/net/sixlowpan/sixlowpan_internal.h
+++ b/net/sixlowpan/sixlowpan_internal.h
@@ -284,7 +284,7 @@ int sixlowpan_send(FAR struct net_driver_s *dev,
                    FAR struct devif_callback_s **list,
                    FAR const struct ipv6_hdr_s *ipv6hdr, FAR const void *buf,
                    size_t len, FAR const struct netdev_varaddr_s *destmac,
-                   uint16_t timeout);
+                   unsigned int timeout);
 
 /****************************************************************************
  * Name: sixlowpan_meta_data
diff --git a/net/sixlowpan/sixlowpan_send.c b/net/sixlowpan/sixlowpan_send.c
index 8fef7e8..05d3a03 100644
--- a/net/sixlowpan/sixlowpan_send.c
+++ b/net/sixlowpan/sixlowpan_send.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * net/sixlowpan/sixlowpan_send.c
  *
- *   Copyright (C) 2017, 2020 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -217,7 +202,7 @@ int sixlowpan_send(FAR struct net_driver_s *dev,
                    FAR struct devif_callback_s **list,
                    FAR const struct ipv6_hdr_s *ipv6hdr, FAR const void *buf,
                    size_t len, FAR const struct netdev_varaddr_s *destmac,
-                   uint16_t timeout)
+                   unsigned int timeout)
 {
   struct sixlowpan_send_s sinfo;
 
diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c
index b4dde3c..95cc4b2 100644
--- a/net/sixlowpan/sixlowpan_tcpsend.c
+++ b/net/sixlowpan/sixlowpan_tcpsend.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * net/sixlowpan/sixlowpan_tcpsend.c
  *
- *   Copyright (C) 2017-2018 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 
@@ -594,7 +579,7 @@ static int sixlowpan_send_packet(FAR struct socket *psock,
                                  FAR struct tcp_conn_s *conn,
                                  FAR const uint8_t *buf, size_t len,
                                  FAR const struct netdev_varaddr_s *destmac,
-                                 uint16_t timeout)
+                                 unsigned int timeout)
 {
   struct sixlowpan_send_s sinfo;
 
diff --git a/net/sixlowpan/sixlowpan_udpsend.c b/net/sixlowpan/sixlowpan_udpsend.c
index a42db28..9085589 100644
--- a/net/sixlowpan/sixlowpan_udpsend.c
+++ b/net/sixlowpan/sixlowpan_udpsend.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * net/sixlowpan/sixlowpan_udpsend.c
  *
- *   Copyright (C) 2017 Gregory Nutt. All rights reserved.
- *   Author: Gregory Nutt <gn...@nuttx.org>
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.  The
+ * ASF licenses this file to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the
+ * License.  You may obtain a copy of the License at
  *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in
- *    the documentation and/or other materials provided with the
- *    distribution.
- * 3. Neither the name NuttX nor the names of its contributors may be
- *    used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
- * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
  *
  ****************************************************************************/
 


[incubator-nuttx] 01/04: Fix warnings noted in PR build checks:

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.git

commit 62c13898255fea1a303d7beef40fb5202d6c952c
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sun Apr 12 09:52:56 2020 -0600

    Fix warnings noted in PR build checks:
    
        net/telnet.c:1317:40: warning: result of comparison of constant 256 with expression of type 'uint8_t' (aka 'unsigned char') is always true [-Wtautological-constant-out-of-range-compare]
                          if (priv->td_pending < CONFIG_TELNET_RXBUFFER_SIZE)
                              ~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    
        time/lib_localtime.c:569:32: warning: sizeof on pointer operation will return size of 'char *' instead of 'char [33]' [-Wsizeof-array-decay]
                  sizeof(lsp->fullname - 1) <= strlen(p) + strlen(name))
                         ~~~~~~~~~~~~~ ^
---
 drivers/net/telnet.c           | 2 +-
 libs/libc/time/lib_localtime.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/telnet.c b/drivers/net/telnet.c
index 5346065..493e958 100644
--- a/drivers/net/telnet.c
+++ b/drivers/net/telnet.c
@@ -144,10 +144,10 @@ struct telnet_dev_s
   sem_t             td_exclsem;   /* Enforces mutually exclusive access */
   sem_t             td_iosem;     /* I/O thread will notify that data is available */
   uint8_t           td_state;     /* (See telnet_state_e) */
-  uint8_t           td_pending;   /* Number of valid, pending bytes in the rxbuffer */
   uint8_t           td_offset;    /* Offset to the valid, pending bytes in the rxbuffer */
   uint8_t           td_crefs;     /* The number of open references to the session */
   uint8_t           td_minor;     /* Minor device number */
+  uint16_t          td_pending;   /* Number of valid, pending bytes in the rxbuffer */
 #ifdef CONFIG_TELNET_SUPPORT_NAWS
   uint16_t          td_rows;      /* Number of NAWS rows */
   uint16_t          td_cols;      /* Number of NAWS cols */
diff --git a/libs/libc/time/lib_localtime.c b/libs/libc/time/lib_localtime.c
index e18b3b5..e2c411a 100644
--- a/libs/libc/time/lib_localtime.c
+++ b/libs/libc/time/lib_localtime.c
@@ -566,7 +566,7 @@ static int tzload(FAR const char *name,
     {
       p = TZDIR;
       if (p == NULL ||
-          sizeof(lsp->fullname - 1) <= strlen(p) + strlen(name))
+          FILENAME_MAX <= strlen(p) + strlen(name))
         {
           goto oops;
         }


[incubator-nuttx] 04/04: Run nxstyle against files modified in previous commit.

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.git

commit 759d8c1bfaa27283e60020ecca358defe0d8a4ef
Author: Gregory Nutt <gn...@nuttx.org>
AuthorDate: Sun Apr 12 11:18:02 2020 -0600

    Run nxstyle against files modified in previous commit.
---
 drivers/rwbuffer.c                                 |   8 +-
 include/nuttx/net/bluetooth.h                      |   6 +-
 include/nuttx/wireless/ieee802154/ieee802154_mac.h | 192 +++++++++++----------
 libs/libnx/nxfonts/nxfonts_cache.c                 |  30 ++--
 net/icmpv6/icmpv6_notify.c                         |   4 +-
 net/icmpv6/icmpv6_rnotify.c                        |   5 +-
 net/sixlowpan/sixlowpan_internal.h                 |  70 ++++----
 net/sixlowpan/sixlowpan_send.c                     |  21 ++-
 net/sixlowpan/sixlowpan_tcpsend.c                  |  48 +++---
 net/sixlowpan/sixlowpan_udpsend.c                  |  11 +-
 10 files changed, 212 insertions(+), 183 deletions(-)

diff --git a/drivers/rwbuffer.c b/drivers/rwbuffer.c
index 8ab204e..6a88e03 100644
--- a/drivers/rwbuffer.c
+++ b/drivers/rwbuffer.c
@@ -390,7 +390,9 @@ static int rwb_rhreload(FAR struct rwbuffer_s *rwb, off_t startblock)
       rwb->rhnblocks    = nblocks;
       rwb->rhblockstart = startblock;
 
-      /* The return value is not the number of blocks we asked to be loaded. */
+      /* The return value is not the number of blocks we asked to be
+       * loaded.
+       */
 
       return nblocks;
     }
@@ -1003,7 +1005,9 @@ ssize_t rwb_write(FAR struct rwbuffer_s *rwb, off_t startblock,
     {
       finfo("startblock=%d wrbuffer=%p\n", startblock, wrbuffer);
 
-      /* Use the block cache unless the buffer size is bigger than block cache */
+      /* Use the block cache unless the buffer size is bigger than block
+       * cache.
+       */
 
       if (nblocks > rwb->wrmaxblocks)
         {
diff --git a/include/nuttx/net/bluetooth.h b/include/nuttx/net/bluetooth.h
index 7ce61a3..0b9d3bc 100644
--- a/include/nuttx/net/bluetooth.h
+++ b/include/nuttx/net/bluetooth.h
@@ -22,7 +22,7 @@
 #define __INCLUDE_NUTTX_NET_BLUETOOTH_H
 
 /****************************************************************************
- * Public Function Prototypes
+ * Included Files
  ****************************************************************************/
 
 #include <nuttx/config.h>
@@ -32,10 +32,6 @@
 #ifdef CONFIG_NET_BLUETOOTH
 
 /****************************************************************************
- * Public Function Prototypes
- ****************************************************************************/
-
-/****************************************************************************
  * Pre-processor Definitions
  ****************************************************************************/
 
diff --git a/include/nuttx/wireless/ieee802154/ieee802154_mac.h b/include/nuttx/wireless/ieee802154/ieee802154_mac.h
index c137803..6b49cb7 100644
--- a/include/nuttx/wireless/ieee802154/ieee802154_mac.h
+++ b/include/nuttx/wireless/ieee802154/ieee802154_mac.h
@@ -1,4 +1,4 @@
-/****************************************************************************
+/*****************************************************************************
  * include/nuttx/wireless/ieee802154/ieee802154_mac.h
  *
  *   Copyright (C) 2016 Sebastien Lorquet. All rights reserved.
@@ -37,14 +37,14 @@
  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  * POSSIBILITY OF SUCH DAMAGE.
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 #ifndef __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_MAC_H
 #define __INCLUDE_NUTTX_WIRELESS_IEEE802154_IEEE802154_MAC_H
 
-/****************************************************************************
+/*****************************************************************************
  * Included Files
- ****************************************************************************/
+ *****************************************************************************/
 
 #include <nuttx/config.h>
 
@@ -59,11 +59,11 @@
 
 #include <nuttx/fs/ioctl.h>
 
-/****************************************************************************
+/*****************************************************************************
  * Pre-Processor Definitions
- ****************************************************************************/
+ *****************************************************************************/
 
-/* Configuration ************************************************************/
+/* Configuration *************************************************************/
 
 #if !defined(CONFIG_MAC802154_NPANDESC) || CONFIG_MAC802154_NPANDESC <= 0
 #  undef CONFIG_MAC802154_NPANDESC
@@ -104,13 +104,12 @@
 
 /* Some addresses */
 
-#define IEEE802154_PANID_UNSPEC ((uint8_t[]){0xFF,0xFF})
-#define IEEE802154_SADDR_UNSPEC ((uint8_t[]){0xFF,0xFF})
-#define IEEE802154_SADDR_BCAST  ((uint8_t[]){0xFE,0xFF})
-#define IEEE802154_EADDR_UNSPEC ((uint8_t[]){0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF})
-
+#define IEEE802154_PANID_UNSPEC ((uint8_t[]){0xff,0xff})
+#define IEEE802154_SADDR_UNSPEC ((uint8_t[]){0xff,0xff})
+#define IEEE802154_SADDR_BCAST  ((uint8_t[]){0xfe,0xff})
+#define IEEE802154_EADDR_UNSPEC ((uint8_t[]){0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff})
 
-/* IEEE 802.15.4 MAC Character Driver IOCTL Commands ************************/
+/* IEEE 802.15.4 MAC Character Driver IOCTL Commands *************************/
 
 /* The IEEE 802.15.4 standard specifies a MLME Service Access Point (SAP)
  * including a series of primitives that are used as an interface between
@@ -139,20 +138,20 @@
 #define MAC802154IOC_MLME_RXENABLE_REQUEST     _MAC802154IOC(0x0007)
 #define MAC802154IOC_MLME_SCAN_REQUEST         _MAC802154IOC(0x0008)
 #define MAC802154IOC_MLME_SET_REQUEST          _MAC802154IOC(0x0009)
-#define MAC802154IOC_MLME_START_REQUEST        _MAC802154IOC(0x000A)
-#define MAC802154IOC_MLME_SYNC_REQUEST         _MAC802154IOC(0x000B)
-#define MAC802154IOC_MLME_POLL_REQUEST         _MAC802154IOC(0x000C)
-#define MAC802154IOC_MLME_DPS_REQUEST          _MAC802154IOC(0x000D)
-#define MAC802154IOC_MLME_SOUNDING_REQUEST     _MAC802154IOC(0x000E)
-#define MAC802154IOC_MLME_CALIBRATE_REQUEST    _MAC802154IOC(0x000F)
+#define MAC802154IOC_MLME_START_REQUEST        _MAC802154IOC(0x000a)
+#define MAC802154IOC_MLME_SYNC_REQUEST         _MAC802154IOC(0x000b)
+#define MAC802154IOC_MLME_POLL_REQUEST         _MAC802154IOC(0x000c)
+#define MAC802154IOC_MLME_DPS_REQUEST          _MAC802154IOC(0x000d)
+#define MAC802154IOC_MLME_SOUNDING_REQUEST     _MAC802154IOC(0x000e)
+#define MAC802154IOC_MLME_CALIBRATE_REQUEST    _MAC802154IOC(0x000f)
 
 /* Non-standard MAC ioctl calls */
 
-#define MAC802154IOC_NOTIFY_REGISTER           _MAC802154IOC(0x00FD)
-#define MAC802154IOC_GET_EVENT                 _MAC802154IOC(0x00FE)
-#define MAC802154IOC_ENABLE_EVENTS             _MAC802154IOC(0x00FF)
+#define MAC802154IOC_NOTIFY_REGISTER           _MAC802154IOC(0x00fd)
+#define MAC802154IOC_GET_EVENT                 _MAC802154IOC(0x00fe)
+#define MAC802154IOC_ENABLE_EVENTS             _MAC802154IOC(0x00ff)
 
-/* IEEE 802.15.4 MAC Interface **********************************************/
+/* IEEE 802.15.4 MAC Interface ***********************************************/
 
 /* Frame control field masks, 2 bytes
  * Seee IEEE 802.15.4/2011 5.2.1.1 page 57
@@ -163,9 +162,9 @@
 #define IEEE802154_FRAMECTRL_PEND       0x0010  /* Frame pending, bit 4 */
 #define IEEE802154_FRAMECTRL_ACKREQ     0x0020  /* Acknowledge request, bit 5 */
 #define IEEE802154_FRAMECTRL_PANIDCOMP  0x0040  /* PAN ID Compression, bit 6 */
-#define IEEE802154_FRAMECTRL_DADDR      0x0C00  /* Dest addressing mode, bits 10-11 */
+#define IEEE802154_FRAMECTRL_DADDR      0x0c00  /* Dest addressing mode, bits 10-11 */
 #define IEEE802154_FRAMECTRL_VERSION    0x3000  /* Source addressing mode, bits 12-13 */
-#define IEEE802154_FRAMECTRL_SADDR      0xC000  /* Source addressing mode, bits 14-15 */
+#define IEEE802154_FRAMECTRL_SADDR      0xc000  /* Source addressing mode, bits 14-15 */
 
 #define IEEE802154_FRAMECTRL_SHIFT_FTYPE      0  /* Frame type, bits 0-2 */
 #define IEEE802154_FRAMECTRL_SHIFT_SEC        3  /* Security Enabled, bit 3 */
@@ -180,9 +179,9 @@
  * Seee IEEE 802.15.4/2011 5.2.2.1.2 page 62
  */
 
-#define IEEE802154_SFSPEC_BEACONORDER 0x000F  /* Beacon order, bits 0-3 */
-#define IEEE802154_SFSPEC_SFORDER     0x00F0  /* Superframe Order, bit 4-7 */
-#define IEEE802154_SFSPEC_FINCAPSLOT  0x0F00  /* Final CAP Slot, bit 8-11 */
+#define IEEE802154_SFSPEC_BEACONORDER 0x000f  /* Beacon order, bits 0-3 */
+#define IEEE802154_SFSPEC_SFORDER     0x00f0  /* Superframe Order, bit 4-7 */
+#define IEEE802154_SFSPEC_FINCAPSLOT  0x0f00  /* Final CAP Slot, bit 8-11 */
 #define IEEE802154_SFSPEC_BLE         0x1000  /* Battery Life Ext, bit 12 */
 #define IEEE802154_SFSPEC_PANCOORD    0x4000  /* PAN Coordinator, bit 14 */
 #define IEEE802154_SFSPEC_ASSOCPERMIT 0x8000  /* Association Permit, bit 15 */
@@ -208,7 +207,7 @@
  * Seee IEEE 802.15.4/2011 5.2.2.1.3 page 63
  */
 
-#define IEEE802154_GTSDIR_MASK  0x7F /* GTS Directions Mask, bits 0-6 */
+#define IEEE802154_GTSDIR_MASK  0x7f /* GTS Directions Mask, bits 0-6 */
 
 #define IEEE802154_GTSDIR_SHIFT_MASK  0 /* GTS Directions Mask, bits 0-6 */
 
@@ -240,7 +239,7 @@
 /* IEEE 802.15.4 PHY constants */
 
 #define IEEE802154_MAX_PHY_PACKET_SIZE        127
-#define IEEE802154_TURN_AROUND_TIME           12 /*symbol periods*/
+#define IEEE802154_TURN_AROUND_TIME           12 /* symbol periods*/
 
 /* IEEE 802.15.4 MAC constants */
 
@@ -280,9 +279,9 @@
 
 #define MAX_ORPHAN_ADDR   32  /* REVISIT */
 
-/****************************************************************************
+/*****************************************************************************
  * Public Types
- ****************************************************************************/
+ *****************************************************************************/
 
 /* IEEE 802.15.4 MAC status codes */
 
@@ -458,7 +457,7 @@ enum ieee802154_attr_e
   IEEE802154_ATTR_MAC_PANCOORD_EXT_ADDR,
   IEEE802154_ATTR_MAC_PANCOORD_SHORT_ADDR,
 
-  /* Non-standard MAC Attributes*/
+  /* Non-standard MAC Attributes */
 
   IEEE802154_ATTR_MAC_DEVMODE,
 };
@@ -474,6 +473,7 @@ enum ieee802154_frametype_e
 };
 
 /* MAC command IDs */
+
 /* TODO: Change terminology to be "current primitive" */
 
 enum ieee802154_cmdid_e
@@ -596,7 +596,7 @@ struct ieee802154_pandesc_s
 
   struct ieee802154_addr_s coordaddr;
 
-  uint8_t chan;  /* current channel occupied by the network */
+  uint8_t chan;   /* current channel occupied by the network */
   uint8_t chpage; /* current channel page occupied by the network */
 
   /* The superframe specifications received in the beacon frame */
@@ -682,6 +682,7 @@ union ieee802154_phyattr_u
   int32_t   txpwr;
   uint32_t  symdur_picosec;
   uint8_t   fcslen;
+
   /* TODO: Fill this out as we implement supported get/set commands */
 };
 
@@ -896,7 +897,8 @@ struct ieee802154_data_ind_s
  * Primitive: MCPS-PURGE.request
  *
  * Description:
- *    Allows the next higher layer to purge an MSDU from the transaction queue.
+ *   Allows the next higher layer to purge an MSDU from the transaction
+ *   queue.
  *
  *****************************************************************************/
 
@@ -923,17 +925,18 @@ struct ieee802154_assoc_req_s
 
   FAR struct ieee802154_primitive_s *flink;
 
-  uint8_t chan;  /* Channel number to attempt association */
+  uint8_t chan;   /* Channel number to attempt association */
   uint8_t chpage; /* Channel page to attempt association */
 
   /* TODO:
    * This is a non-standard field. I believe there is a catch 22 in the
-   * standard and until I can figure it out, I'm adding this boolean to let the
-   * application tell the MAC whether it is trying to assocaite with a beacon
-   * enabled PAN or non-beacon enabled PAN. If it is beacon-enabled, the MAC
-   * will track the beacon first before transmitting the association. This can
-   * take some time depending on the beacon interval. If the PAN is non-beacon
-   * enabled, the association request is sent immediately via CSMA.
+   * standard and until I can figure it out, I'm adding this boolean to let
+   * the application tell the MAC whether it is trying to associate with a
+   * beacon enabled PAN or non-beacon enabled PAN. If it is beacon-enabled,
+   * the MAC will track the beacon first before transmitting the
+   * association.  This can take some time depending on the beacon interval.
+   * If the PAN is non-beacon enabled, the association request is sent
+   * immediately via CSMA.
    *
    * The catch 22: The standard outlines the procedure for associating: reset
    * the MAC, scan to find PAN's and pass coordinator address info to
@@ -1018,7 +1021,7 @@ struct ieee802154_assoc_resp_s
 
   uint8_t devaddr[IEEE802154_EADDRSIZE];
 
-  /* Address assigned to the device. 0xFFFF if failure */
+  /* Address assigned to the device. 0xffff if failure */
 
   uint8_t assocsaddr[IEEE802154_SADDRSIZE];
 
@@ -1037,8 +1040,8 @@ struct ieee802154_assoc_resp_s
  * Primitive: MLME-ASSOCIATE.confirm
  *
  * Description:
- *    Used to inform the next higher layer of the initiating device whether its
- *    request to associate was successful or unsuccessful.
+ *   Used to inform the next higher layer of the initiating device whether
+ *   its request to associate was successful or unsuccessful.
  *
  *****************************************************************************/
 
@@ -1155,11 +1158,11 @@ struct ieee802154_disassoc_conf_s
  * Primitive: MLME-BEACONNOTIFY.indication
  *
  * Description:
- *    Used to send parameters contained within a beacon frame received by the
- *    MAC sublayer to the next higher layer when either macAutoRequest is set to
- *    FALSE or when the beacon frame contains one or more octets of payload. The
- *    primitive also sends a measure of the LQI and the time the beacon frame
- *    was received.
+ *   Used to send parameters contained within a beacon frame received by
+ *   the MAC sublayer to the next higher layer when either macAutoRequest is
+ *   set to FALSE or when the beacon frame contains one or more octets of
+ *   payload.  The primitive also sends a measure of the LQI and the time the
+ *   beacon frame was received.
  *
  *****************************************************************************/
 
@@ -1211,9 +1214,9 @@ struct ieee802154_commstatus_ind_s
  * Primitive: MLME-GTS.request
  *
  * Description:
- *    Allows a device to send a request to the PAN coordinator to allocate a new
- *    GTS or to deallocate an existing GTS. This primitive is also used by the
- *    PAN coordinator to initiate a GTS deallocation.
+ *   Allows a device to send a request to the PAN coordinator to allocate a
+ *   new GTS or to deallocate an existing GTS. This primitive is also used
+ *   by the PAN coordinator to initiate a GTS deallocation.
  *
  *****************************************************************************/
 
@@ -1236,8 +1239,8 @@ struct ieee802154_gts_req_s
  * Primitive: MLME-GTS.confirm
  *
  * Description:
- *    Reports the results of a request to allocate a new GTS or to deallocate an
- *    existing GTS.
+ *    Reports the results of a request to allocate a new GTS or to deallocate
+ *    an existing GTS.
  *
  *****************************************************************************/
 
@@ -1280,8 +1283,8 @@ struct ieee802154_gts_ind_s
  * Primitive: MLME-ORPHAN.indication
  *
  * Description:
- *    Generated by the MLME of a coordinator and issued to its next higher layer
- *    on receipt of an orphan notification command.
+ *    Generated by the MLME of a coordinator and issued to its next higher
+ *    layer on receipt of an orphan notification command.
  *
  *****************************************************************************/
 
@@ -1468,10 +1471,10 @@ struct ieee802154_get_req_s
  *    Attempts to write the given value to the indicated PIB attribute.
  *
  *  NOTE: The standard specifies that confirmation should be indicated via
- *  the asynchronous MLME-SET.confirm primitive.  However, in our implementation
- *  there is no reason not to synchronously return the status immediately.
- *  Therefore, we do merge the functionality of the MLME-SET.request and
- *  MLME-SET.confirm primitives together.
+ *  the asynchronous MLME-SET.confirm primitive.  However, in our
+ *  implementation there is no reason not to synchronously return the status
+ *  immediately.  Therefore, we do merge the functionality of the
+ *  MLME-SET.request and MLME-SET.confirm primitives together.
  *
  *****************************************************************************/
 
@@ -1489,9 +1492,9 @@ struct ieee802154_set_req_s
  * Primitive: MLME-START.request
  *
  * Description:
- *    Used by the PAN coordinator to initiate a new PAN or to begin using a new
- *    superframe configuration. This primitive is also used by a device already
- *    associated with an existing PAN to begin using a new superframe
+ *    Used by the PAN coordinator to initiate a new PAN or to begin using a
+ *    new superframe configuration. This primitive is also used by a device
+ *    already associated with an existing PAN to begin using a new superframe
  *    configuration.
  *
  *****************************************************************************/
@@ -1689,9 +1692,9 @@ union ieee802154_primitive_u
 struct ieee802154_primitive_s
 {
   /* Must be first member so that we can interchange between the actual
-   * primitive and this extended struct. Note, all frames also have the first
-   * entry as a forward link to a primitive so that primitives can be contained
-   * in lists.
+   * primitive and this extended struct. Note, all frames also have the
+   * first entry as a forward link to a primitive so that primitives can be
+   * contained in lists.
    */
 
   union ieee802154_primitive_u u;
@@ -1718,9 +1721,9 @@ union ieee802154_macarg_u
   struct ieee802154_start_req_s    startreq;    /* MAC802154IOC_MLME_START_REQUEST */
   struct ieee802154_sync_req_s     syncreq;     /* MAC802154IOC_MLME_SYNC_REQUEST */
   struct ieee802154_poll_req_s     pollreq;     /* MAC802154IOC_MLME_POLL_REQUEST */
-  /* To be determined */                        /* MAC802154IOC_MLME_DPS_REQUEST */
-  /* To be determined */                        /* MAC802154IOC_MLME_SOUNDING_REQUEST */
-  /* To be determined */                        /* MAC802154IOC_MLME_CALIBRATE_REQUEST */
+                                                /* MAC802154IOC_MLME_DPS_REQUEST */
+                                                /* MAC802154IOC_MLME_SOUNDING_REQUEST */
+                                                /* MAC802154IOC_MLME_CALIBRATE_REQUEST */
 
   struct sigevent                  event;       /* MAC802154IOC_NOTIFY_REGISTER */
   struct ieee802154_primitive_s    primitive;   /* MAC802154IOC_GET_EVENT */
@@ -1755,13 +1758,13 @@ extern "C"
 #define EXTERN extern
 #endif
 
-/****************************************************************************
+/*****************************************************************************
  * Public Function Prototypes
- ****************************************************************************/
+ *****************************************************************************/
 
 struct ieee802154_radio_s; /* Forward reference */
 
-/****************************************************************************
+/*****************************************************************************
  * Name: mac802154_create
  *
  * Description:
@@ -1783,11 +1786,11 @@ struct ieee802154_radio_s; /* Forward reference */
  * Returned Value:
  *   An opaque reference to the MAC state data.
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 MACHANDLE mac802154_create(FAR struct ieee802154_radio_s *radiodev);
 
-/****************************************************************************
+/*****************************************************************************
  * Name: mac802154dev_register
  *
  * Description:
@@ -1803,11 +1806,11 @@ MACHANDLE mac802154_create(FAR struct ieee802154_radio_s *radiodev);
  *   Zero (OK) is returned on success.  Otherwise a negated errno value is
  *   returned to indicate the nature of the failure.
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 int mac802154dev_register(MACHANDLE mac, int minor);
 
-/****************************************************************************
+/*****************************************************************************
  * Name: mac802154netdev_register
  *
  * Description:
@@ -1821,19 +1824,19 @@ int mac802154dev_register(MACHANDLE mac, int minor);
  *   Zero (OK) is returned on success.  Otherwise a negated errno value is
  *   returned to indicate the nature of the failure.
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 int mac802154netdev_register(MACHANDLE mac);
 
-/****************************************************************************
+/*****************************************************************************
  * Name: ieee802154_primitivepool_initialize
  *
  * Description:
- *   This function initializes the primitive allocator. Primitives are defined
- *   in the standard and are used to pass information between the MAC layer and
- *   the next highest layer. They are a data type abstraction.  This function must
- *   be called early in the initialization sequence before any radios
- *   begin operation.
+ *   This function initializes the primitive allocator. Primitives are
+ *   defined in the standard and are used to pass information between the
+ *   MAC layer and the next highest layer. They are a data type abstraction.
+ *   This function must be called early in the initialization sequence
+ *   before any radios begin operation.
  *
  * Input Parameters:
  *   None
@@ -1841,11 +1844,11 @@ int mac802154netdev_register(MACHANDLE mac);
  * Returned Value:
  *   None
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 void ieee802154_primitivepool_initialize(void);
 
-/****************************************************************************
+/*****************************************************************************
  * Name: ieee802154_primitive_allocate
  *
  * Description:
@@ -1865,21 +1868,22 @@ void ieee802154_primitivepool_initialize(void);
  *   None
  *
  * Returned Value:
- *   A reference to the allocated primitive structure.  All user fields in this
- *   structure have been zeroed.  On a failure to allocate, NULL is
+ *   A reference to the allocated primitive structure.  All user fields in
+ *   this structure have been zeroed.  On a failure to allocate, NULL is
  *   returned.
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 FAR struct ieee802154_primitive_s *ieee802154_primitive_allocate(void);
 
-/****************************************************************************
+/*****************************************************************************
  * Name: ieee802154_primitive_free
  *
  * Description:
- *   The ieee802154_primitive_free function will return a primitive structure to
- *   the free pool if it was a pre-allocated primitive structure. If the primitive
- *   was allocated dynamically it will be deallocated.
+ *   The ieee802154_primitive_free function will return a primitive
+ *   structure to the free pool if it was a pre-allocated primitive
+ *   structure. If the primitive was allocated dynamically it will be
+ *   deallocated.
  *
  * Input Parameters:
  *   prim - primitive structure to free
@@ -1887,7 +1891,7 @@ FAR struct ieee802154_primitive_s *ieee802154_primitive_allocate(void);
  * Returned Value:
  *   None
  *
- ****************************************************************************/
+ *****************************************************************************/
 
 void ieee802154_primitive_free(FAR struct ieee802154_primitive_s *prim);
 
diff --git a/libs/libnx/nxfonts/nxfonts_cache.c b/libs/libnx/nxfonts/nxfonts_cache.c
index c2ad01a..316a7e0 100644
--- a/libs/libnx/nxfonts/nxfonts_cache.c
+++ b/libs/libnx/nxfonts/nxfonts_cache.c
@@ -282,9 +282,9 @@ static FAR struct nxfonts_glyph_s *
 
   /* Try to find the glyph in the list of pre-rendered glyphs */
 
-   for (prev = NULL, glyph = priv->head;
-        glyph != NULL;
-        prev = glyph, glyph = glyph->flink)
+  for (prev = NULL, glyph = priv->head;
+       glyph != NULL;
+       prev = glyph, glyph = glyph->flink)
     {
       /* Check if we found the glyph for this character */
 
@@ -433,9 +433,12 @@ static inline void nxf_fillglyph(FAR struct nxfonts_fcache_s *priv,
 
       /* Get two 32-bit values for alternating 32 representations */
 
-      pixel[0] = (uint32_t)priv->bgcolor <<  8 | (uint32_t)priv->bgcolor >> 16;
-      pixel[1] = (uint32_t)priv->bgcolor << 16 | (uint32_t)priv->bgcolor >> 8;
-      pixel[2] = (uint32_t)priv->bgcolor << 24 | (uint32_t)priv->bgcolor;
+      pixel[0] = (uint32_t)priv->bgcolor <<  8 |
+                 (uint32_t)priv->bgcolor >> 16;
+      pixel[1] = (uint32_t)priv->bgcolor << 16 |
+                 (uint32_t)priv->bgcolor >> 8;
+      pixel[2] = (uint32_t)priv->bgcolor << 24 |
+                 (uint32_t)priv->bgcolor;
 
       for (row = 0; row < glyph->height; row++)
         {
@@ -532,7 +535,9 @@ static inline FAR struct nxfonts_glyph_s *
 
   if (glyph != NULL)
     {
-      /* Save the character code, dimensions, and physical width of the glyph */
+      /* Save the character code, dimensions, and physical width of the
+       * glyph.
+       */
 
       glyph->code   = ch;
       glyph->width  = width;
@@ -660,7 +665,7 @@ FCACHE nxf_cache_connect(enum nx_fontid_e fontid,
       /* Allocate memory for the (empty) font cache */
 
       priv = (FAR struct nxfonts_fcache_s *)
-        lib_zalloc(sizeof( struct nxfonts_fcache_s));
+        lib_zalloc(sizeof(struct nxfonts_fcache_s));
 
       if (priv == NULL)
         {
@@ -784,7 +789,8 @@ errout_with_lock:
  *   font handle is invalid upon return in either case.
  *
  * Input Parameters:
- *   fhandle - A font cache handle previously returned by nxf_cache_connect();
+ *   fhandle - A font cache handle previously returned by
+ *             nxf_cache_connect();
  *
  * Returned Value:
  *   None
@@ -864,7 +870,8 @@ void nxf_cache_disconnect(FCACHE fhandle)
  *   cache.
  *
  * Input Parameters:
- *   fhandle - A font cache handle previously returned by nxf_cache_connect();
+ *   fhandle - A font cache handle previously returned by
+ *             nxf_cache_connect();
  *
  * Returned Value:
  *   Zero (OK) is returned if the metrics were
@@ -896,7 +903,8 @@ NXHANDLE nxf_cache_getfonthandle(FCACHE fhandle)
  *
  ****************************************************************************/
 
-FAR const struct nxfonts_glyph_s *nxf_cache_getglyph(FCACHE fhandle, uint8_t ch)
+FAR const struct nxfonts_glyph_s *
+  nxf_cache_getglyph(FCACHE fhandle, uint8_t ch)
 {
   FAR struct nxfonts_fcache_s *priv = (FAR struct nxfonts_fcache_s *)fhandle;
   FAR struct nxfonts_glyph_s *glyph;
diff --git a/net/icmpv6/icmpv6_notify.c b/net/icmpv6/icmpv6_notify.c
index b131965..d38d039 100644
--- a/net/icmpv6/icmpv6_notify.c
+++ b/net/icmpv6/icmpv6_notify.c
@@ -70,8 +70,8 @@ static struct icmpv6_notify_s *g_icmpv6_waiters;
  *   is sent so that there is no race condition when icmpv6_wait() is called.
  *
  * Assumptions:
- *   This function is called from icmpv6_neighbor() and executes in the normal
- *   tasking environment.
+ *   This function is called from icmpv6_neighbor() and executes in the
+ *   normal tasking environment.
  *
  ****************************************************************************/
 
diff --git a/net/icmpv6/icmpv6_rnotify.c b/net/icmpv6/icmpv6_rnotify.c
index 9172b7b..8a9d1ca 100644
--- a/net/icmpv6/icmpv6_rnotify.c
+++ b/net/icmpv6/icmpv6_rnotify.c
@@ -286,8 +286,9 @@ int icmpv6_rwait(FAR struct icmpv6_rnotify_s *notify, unsigned int timeout)
  *
  ****************************************************************************/
 
-void icmpv6_rnotify(FAR struct net_driver_s *dev, const net_ipv6addr_t draddr,
-                    const net_ipv6addr_t prefix, unsigned int preflen)
+void icmpv6_rnotify(FAR struct net_driver_s *dev,
+                    const net_ipv6addr_t draddr, const net_ipv6addr_t prefix,
+                    unsigned int preflen)
 {
   FAR struct icmpv6_rnotify_s *curr;
 
diff --git a/net/sixlowpan/sixlowpan_internal.h b/net/sixlowpan/sixlowpan_internal.h
index edbb90e..f250ebe 100644
--- a/net/sixlowpan/sixlowpan_internal.h
+++ b/net/sixlowpan/sixlowpan_internal.h
@@ -25,7 +25,8 @@
  *    All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
+ * modification, are permitted provided that the following conditions are
+ * met:
  *
  * 1. Redistributions of source code must retain the above copyright
  *    notice, this list of conditions and the following disclaimer.
@@ -37,17 +38,18 @@
  *    contributors may be used to endorse or promote products derived
  *    from this software without specific prior written permission.
  *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
+ * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
  ****************************************************************************/
 
 #ifndef _NET_SIXLOWPAN_SIXLOWPAN_INTERNAL_H
@@ -194,8 +196,8 @@ struct ieee802_txmetadata_s
 };
 #endif
 
-/* This structure holds the packet metadata as a union when multiple different
- * radio type are supported.
+/* This structure holds the packet metadata as a union when multiple
+ * different radio types are supported.
  */
 
 union sixlowpan_metadata_u
@@ -251,9 +253,9 @@ struct iob_s;               /* Forward reference */
  * Name: sixlowpan_send
  *
  * Description:
- *   Process an outgoing UDP or ICMPv6 packet.  Takes an IP packet and formats
- *   it to be sent on an 802.15.4 network using 6lowpan.  Called from common
- *   UDP/ICMPv6 send logic.
+ *   Process an outgoing UDP or ICMPv6 packet.  Takes an IP packet and
+ *   formats it to be sent on an 802.15.4 network using 6lowpan.  Called
+ *   from common UDP/ICMPv6 send logic.
  *
  *   The payload data is in the caller 'buf' and is of length 'buflen'.
  *   Compressed headers will be added and if necessary the packet is
@@ -398,12 +400,12 @@ int sixlowpan_queue_frames(FAR struct radio_driver_s *radio,
  * Name: sixlowpan_hc06_initialize
  *
  * Description:
- *   sixlowpan_hc06_initialize() is called during OS initialization at power-up
- *   reset.  It is called from the common sixlowpan_initialize() function.
- *   sixlowpan_hc06_initialize() configures HC06 networking data structures.
- *   It is called prior to platform-specific driver initialization so that
- *   the 6LoWPAN networking subsystem is prepared to deal with network
- *   driver initialization actions.
+ *   sixlowpan_hc06_initialize() is called during OS initialization at
+ *   power-up reset.  It is called from the common sixlowpan_initialize()
+ *   function.  sixlowpan_hc06_initialize() configures HC06 networking data
+ *   structures.  It is called prior to platform-specific driver
+ *   initialization so that the 6LoWPAN networking subsystem is prepared to
+ *   deal with network driver initialization actions.
  *
  * Input Parameters:
  *   None
@@ -571,10 +573,10 @@ int sixlowpan_uncompresshdr_hc1(FAR struct radio_driver_s *radio,
  *
  * Description:
  *   sixlowpan_nexthopaddr(): If the destination is on-link, extract the
- *   IEEE 802.15.14 destination address from the destination IP address. If the
- *   destination is not reachable directly, use the routing table (if available)
- *   or fall back to the default router IP address and use the router IP address
- *   to derive the IEEE 802.15.4 MAC address.
+ *   IEEE 802.15.14 destination address from the destination IP address.  If
+ *   the destination is not reachable directly, use the routing table (if
+ *   available) or fall back to the default router IP address and use the
+ *   router IP address to derive the IEEE 802.15.4 MAC address.
  *
  ****************************************************************************/
 
@@ -601,15 +603,17 @@ int sixlowpan_nexthopaddr(FAR struct radio_driver_s *radio,
  *   (eaddr).
  *
  *   sixlowpan_islinklocal() and sixlowpan_ismacbased() will return true for
- *   address created in this fashion.  sixlowpan_destaddrfromip() is intended to
- *   handle a tagged address or any size.  Local addresses are of a fixed but
- *   configurable size and sixlowpan_isaddrbased() is for use with such local
- *   addresses.
+ *   address created in this fashion.  sixlowpan_destaddrfromip() is
+ *   intended to handle a tagged address or any size.  Local addresses are
+ *   of a fixed but configurable size and sixlowpan_isaddrbased() is for use
+ *   with such local addresses.
  *
  *    128  112  96   80    64   48   32   16
  *    ---- ---- ---- ----  ---- ---- ---- ----
- *    fe80 0000 0000 0000  0000 00ff fe00 xxxx 2-byte short address IEEE 48-bit MAC
- *    fe80 0000 0000 0000  xxxx xxxx xxxx xxxx 8-byte extended address IEEE EUI-64
+ *    fe80 0000 0000 0000  0000 00ff fe00 xxxx 2-byte short address IEEE
+ *                                             48-bit MAC
+ *    fe80 0000 0000 0000  xxxx xxxx xxxx xxxx 8-byte extended address IEEE
+ *                                             EUI-64
  *
  ****************************************************************************/
 
diff --git a/net/sixlowpan/sixlowpan_send.c b/net/sixlowpan/sixlowpan_send.c
index 05d3a03..cbb5ef3 100644
--- a/net/sixlowpan/sixlowpan_send.c
+++ b/net/sixlowpan/sixlowpan_send.c
@@ -61,13 +61,16 @@
 
 struct sixlowpan_send_s
 {
-  FAR struct devif_callback_s *s_cb;      /* Reference to callback instance */
-  sem_t                        s_waitsem; /* Supports waiting for driver events */
-  int                          s_result;  /* The result of the transfer */
-  FAR const struct ipv6_hdr_s *s_ipv6hdr; /* IPv6 header, followed by UDP or ICMP header. */
+  FAR struct devif_callback_s *s_cb;            /* Reference to callback
+                                                 * instance */
+  sem_t                        s_waitsem;       /* Supports waiting for
+                                                 * driver events */
+  int                          s_result;        /* The result of the transfer */
+  FAR const struct ipv6_hdr_s *s_ipv6hdr;       /* IPv6 header, followed by
+                                                 * UDP or ICMP header. */
   FAR const struct netdev_varaddr_s *s_destmac; /* Destination MAC address */
-  FAR const void              *s_buf;     /* Data to send */
-  size_t                       s_len;     /* Length of data in buf */
+  FAR const void              *s_buf;           /* Data to send */
+  size_t                       s_len;           /* Length of data in buf */
 };
 
 /****************************************************************************
@@ -169,9 +172,9 @@ end_wait:
  * Name: sixlowpan_send
  *
  * Description:
- *   Process an outgoing UDP or ICMPv6 packet.  Takes an IP packet and formats
- *   it to be sent on an 802.15.4 network using 6lowpan.  Called from common
- *   UDP/ICMPv6 send logic.
+ *   Process an outgoing UDP or ICMPv6 packet.  Takes an IP packet and
+ *   formats it to be sent on an 802.15.4 network using 6lowpan.  Called
+ *   from common UDP/ICMPv6 send logic.
  *
  *   The payload data is in the caller 'buf' and is of length 'buflen'.
  *   Compressed headers will be added and if necessary the packet is
diff --git a/net/sixlowpan/sixlowpan_tcpsend.c b/net/sixlowpan/sixlowpan_tcpsend.c
index 95cc4b2..4dbff19 100644
--- a/net/sixlowpan/sixlowpan_tcpsend.c
+++ b/net/sixlowpan/sixlowpan_tcpsend.c
@@ -75,16 +75,18 @@
 
 struct sixlowpan_send_s
 {
-  FAR struct socket           *s_sock;    /* Internal socket reference */
-  FAR struct devif_callback_s *s_cb;      /* Reference to callback instance */
-  sem_t                        s_waitsem; /* Supports waiting for driver events */
-  int                          s_result;  /* The result of the transfer */
+  FAR struct socket           *s_sock;          /* Internal socket reference */
+  FAR struct devif_callback_s *s_cb;            /* Reference to callback
+                                                 * instance */
+  sem_t                        s_waitsem;       /* Supports waiting for
+                                                 * driver events */
+  int                          s_result;        /* The result of the transfer */
   FAR const struct netdev_varaddr_s *s_destmac; /* Destination MAC address */
-  FAR const uint8_t           *s_buf;     /* Data to send */
-  size_t                       s_buflen;  /* Length of data in buf */
-  ssize_t                      s_sent;    /* The number of bytes sent */
-  uint32_t                     s_isn;     /* Initial sequence number */
-  uint32_t                     s_acked;   /* The number of bytes acked */
+  FAR const uint8_t           *s_buf;           /* Data to send */
+  size_t                       s_buflen;        /* Length of data in buf */
+  ssize_t                      s_sent;          /* The number of bytes sent */
+  uint32_t                     s_isn;           /* Initial sequence number */
+  uint32_t                     s_acked;         /* The number of bytes acked */
 };
 
 /****************************************************************************
@@ -99,7 +101,8 @@ struct sixlowpan_send_s
  *   data payload as necessary.
  *
  * Input Parameters:
- *   ipv6tcp - A reference to a structure containing the IPv6 and TCP headers.
+ *   ipv6tcp - A reference to a structure containing the IPv6 and TCP
+ *             headers.
  *   buf     - The beginning of the payload data
  *   buflen  - The length of the payload data.
  *
@@ -449,15 +452,17 @@ static uint16_t tcp_send_eventhandler(FAR struct net_driver_s *dev,
         }
 
       ninfo("s_buflen=%u s_sent=%u mss=%u winsize=%u sndlen=%d\n",
-            sinfo->s_buflen, sinfo->s_sent, conn->mss, conn->winsize, sndlen);
+            sinfo->s_buflen, sinfo->s_sent, conn->mss, conn->winsize,
+            sndlen);
 
       if (sndlen > 0)
         {
-          /* Set the sequence number for this packet.  NOTE:  The network updates
-           * sndseq on receipt of ACK *before* this function is called.  In that
-           * case sndseq will point to the next unacknowledged byte (which might
-           * have already been sent).  We will overwrite the value of sndseq
-           * here before the packet is sent.
+          /* Set the sequence number for this packet.  NOTE:  The network
+           * updates sndseq on receipt of ACK *before* this function is
+           * called.  In that case sndseq will point to the next
+           * unacknowledged byte (which might have already been sent).  We
+           * will overwrite the value of sndseq here before the packet is
+           * sent.
            */
 
           seqno = sinfo->s_sent + sinfo->s_isn;
@@ -493,8 +498,8 @@ static uint16_t tcp_send_eventhandler(FAR struct net_driver_s *dev,
           /* Increment the count of bytes sent, the number of unacked bytes,
            * and the total count of TCP packets sent.
            *
-           * NOTE: tcp_appsend() normally increments conn->tx_unacked based on
-           * the value of dev->d_sndlen.  However, dev->d_len is always
+           * NOTE: tcp_appsend() normally increments conn->tx_unacked based
+           * on the value of dev->d_sndlen.  However, dev->d_len is always
            * zero for 6LoWPAN since it does not send via the dev->d_buf
            * but, rather, uses a backdoor frame interface with the IEEE
            * 802.15.4 MAC.
@@ -677,8 +682,8 @@ static int sixlowpan_send_packet(FAR struct socket *psock,
  * Name: psock_6lowpan_tcp_send
  *
  * Description:
- *   psock_6lowpan_tcp_send() call may be used only when the TCP socket is in a
- *   connected state (so that the intended recipient is known).
+ *   psock_6lowpan_tcp_send() call may be used only when the TCP socket is
+ *   in a connected state (so that the intended recipient is known).
  *
  * Input Parameters:
  *   psock - An instance of the internal socket structure.
@@ -889,7 +894,8 @@ void sixlowpan_tcp_send(FAR struct net_driver_s *dev,
            * units of 32-bit words).
            */
 
-          hdrlen = IPv6_HDRLEN + (((uint16_t)ipv6hdr->tcp.tcpoffset >> 4) << 2);
+          hdrlen = IPv6_HDRLEN +
+                   (((uint16_t)ipv6hdr->tcp.tcpoffset >> 4) << 2);
 
           /* Drop the packet if the buffer length is less than this. */
 
diff --git a/net/sixlowpan/sixlowpan_udpsend.c b/net/sixlowpan/sixlowpan_udpsend.c
index 9085589..309504d 100644
--- a/net/sixlowpan/sixlowpan_udpsend.c
+++ b/net/sixlowpan/sixlowpan_udpsend.c
@@ -52,11 +52,12 @@
  * Name: sixlowpan_udp_chksum
  *
  * Description:
- *   Perform the checksum calcaultion over the IPv6, protocol headers, and
+ *   Perform the checksum calculation over the IPv6, protocol headers, and
  *   data payload as necessary.
  *
  * Input Parameters:
- *   ipv6udp - A reference to a structure containing the IPv6 and UDP headers.
+ *   ipv6udp - A reference to a structure containing the IPv6 and UDP
+ *             headers.
  *   buf     - The beginning of the payload data
  *   buflen  - The length of the payload data.
  *
@@ -238,7 +239,8 @@ ssize_t psock_6lowpan_udp_sendto(FAR struct socket *psock,
 
   /* Copy the source and destination addresses */
 
-  net_ipv6addr_hdrcopy(ipv6udp.ipv6.destipaddr, to6->sin6_addr.in6_u.u6_addr16);
+  net_ipv6addr_hdrcopy(ipv6udp.ipv6.destipaddr,
+                       to6->sin6_addr.in6_u.u6_addr16);
   if (!net_ipv6addr_cmp(conn->u.ipv6.laddr, g_ipv6_unspecaddr))
     {
       net_ipv6addr_hdrcopy(ipv6udp.ipv6.srcipaddr, conn->u.ipv6.laddr);
@@ -292,7 +294,8 @@ ssize_t psock_6lowpan_udp_sendto(FAR struct socket *psock,
 
   ret = sixlowpan_send(dev, &conn->list,
                        (FAR const struct ipv6_hdr_s *)&ipv6udp,
-                       buf, buflen, &destmac, _SO_TIMEOUT(psock->s_sndtimeo));
+                       buf, buflen, &destmac,
+                       _SO_TIMEOUT(psock->s_sndtimeo));
   if (ret < 0)
     {
       nerr("ERROR: sixlowpan_send() failed: %d\n", ret);