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 2021/04/02 16:12:35 UTC

[incubator-nuttx] branch master updated (b10c6d6 -> b7c451c)

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 b10c6d6  board/arm/lpc17xx_40xx/mbed: userled defconfig
     new 8975a65  net: fix nxstyle errors
     new ed8e5e9  libs: fix nxstyle errors
     new d3313ee  libs: libc: lib_vikmemcpy.c: Mixed case identifier fix
     new b7c451c  libs: Gregory Nutt: update licenses to Apache

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:
 libs/libc/machine/sim/arch_elf.c      |  39 ++--
 libs/libc/machine/x86/arch_elf.c      |  39 ++--
 libs/libc/math/__cos.c                |   3 +-
 libs/libc/math/lib_asin.c             |   3 +-
 libs/libc/math/lib_asinf.c            |   3 +-
 libs/libc/math/lib_asinl.c            |   4 +-
 libs/libc/math/lib_erf.c              |   3 +-
 libs/libc/math/lib_erff.c             |   3 +-
 libs/libc/math/lib_erfl.c             |   6 +-
 libs/libc/math/lib_floorl.c           |   1 -
 libs/libc/math/lib_log.c              |   1 -
 libs/libc/math/lib_rint.c             |  43 ++--
 libs/libc/math/lib_rintf.c            |  43 ++--
 libs/libc/math/lib_rintl.c            |  43 ++--
 libs/libc/math/lib_sqrt.c             |   3 +-
 libs/libc/math/lib_sqrtl.c            |   9 +-
 libs/libc/math/lib_truncl.c           |   9 +-
 libs/libc/misc/lib_crc16.c            |  20 +-
 libs/libc/misc/lib_crc32.c            |   1 +
 libs/libc/misc/lib_crc8.c             |   2 +-
 libs/libc/misc/lib_debug.c            |  40 ++--
 libs/libc/misc/lib_envpath.c          |  56 ++----
 libs/libc/misc/lib_filesem.c          |  39 ++--
 libs/libc/misc/lib_kbddecode.c        |  10 +-
 libs/libc/misc/lib_kbdencode.c        |   6 +-
 libs/libc/misc/lib_mkfifo.c           |  39 ++--
 libs/libc/misc/lib_ncompress.c        | 361 ++++++++++++++++++----------------
 libs/libc/misc/lib_sendfile.c         |  39 ++--
 libs/libc/misc/lib_slcddecode.c       |  11 +-
 libs/libc/misc/lib_stream.c           |  40 ++--
 libs/libc/misc/lib_streamsem.c        |  39 ++--
 libs/libc/misc/lib_tea_decrypt.c      |  49 ++---
 libs/libc/misc/lib_tea_encrypt.c      |  49 ++---
 libs/libc/misc/lib_uadd32x64.c        |  39 ++--
 libs/libc/misc/lib_uadd64.c           |  39 ++--
 libs/libc/misc/lib_umul32.c           |  39 ++--
 libs/libc/misc/lib_umul32x64.c        |  39 ++--
 libs/libc/misc/lib_umul64.c           |  39 ++--
 libs/libc/misc/lib_usub64.c           |  39 ++--
 libs/libc/misc/lib_usub64x32.c        |  39 ++--
 libs/libc/net/lib_addrconfig.c        |   4 +
 libs/libc/net/lib_inetpton.c          |  25 ++-
 libs/libc/signal/sig_emptyset.c       |  43 ++--
 libs/libc/spawn/lib_psfa_addopen.c    |  39 ++--
 libs/libc/stdio/lib_libsnoflush.c     |  43 ++--
 libs/libc/stdio/lib_lowoutstream.c    |  39 ++--
 libs/libc/stdio/lib_ultoa_invert.c    |   1 +
 libs/libc/stdio/lib_vdprintf.c        |   6 +-
 libs/libc/stdio/lib_vfscanf.c         |   4 +-
 libs/libc/stdio/lib_vsnprintf.c       |  43 ++--
 libs/libc/stdlib/lib_itoa.c           |   5 +-
 libs/libc/stdlib/lib_qsort.c          |   2 +-
 libs/libc/stdlib/lib_strtod.c         |  12 +-
 libs/libc/stdlib/lib_strtof.c         |  12 +-
 libs/libc/stdlib/lib_strtol.c         |  39 ++--
 libs/libc/stdlib/lib_strtold.c        |  12 +-
 libs/libc/string/lib_explicit_bzero.c |   2 +-
 libs/libc/string/lib_memccpy.c        |  40 ++--
 libs/libc/string/lib_strncpy.c        |  39 ++--
 libs/libc/string/lib_strtok.c         |  39 ++--
 libs/libc/string/lib_strtokr.c        |  41 ++--
 libs/libc/string/lib_vikmemcpy.c      |  17 +-
 libs/libc/wchar/lib_wcscmp.c          |   9 +-
 libs/libc/wchar/lib_wcscoll.c         |   4 +-
 libs/libc/wchar/lib_wcslcpy.c         |  10 +-
 libs/libc/wchar/lib_wcslen.c          |   2 +-
 libs/libc/wchar/lib_wcstoll.c         |   3 +-
 libs/libc/wchar/lib_wcstoul.c         |   3 +-
 libs/libc/wchar/lib_wcstoull.c        |   5 +-
 libs/libc/wchar/lib_wcsxfrm.c         |   8 +-
 libs/libc/wchar/lib_wmemchr.c         |   1 +
 libs/libc/wchar/lib_wmemmove.c        |   6 +-
 libs/libc/wctype/lib_iswctype.c       |  24 +--
 libs/libc/wctype/lib_towlower.c       |  24 +--
 libs/libc/wctype/lib_towupper.c       |  24 +--
 libs/libc/wctype/lib_wctype.c         |  24 +--
 libs/libnx/nxcontext.h                |  39 ++--
 net/sixlowpan/sixlowpan_hc06.c        | 118 +++++++----
 net/sixlowpan/sixlowpan_hc1.c         |  21 +-
 net/udp/udp_devpoll.c                 |   6 +-
 net/udp/udp_input.c                   |   4 +-
 net/usrsock/usrsock_connect.c         |   3 +-
 net/usrsock/usrsock_poll.c            |  12 +-
 83 files changed, 926 insertions(+), 1260 deletions(-)

[incubator-nuttx] 02/04: libs: fix nxstyle errors

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 ed8e5e971bf83d80f4ac1517e58a9bdd0331c704
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 2 07:44:54 2021 +0200

    libs: fix nxstyle errors
    
    fix erros reported by nxstyle
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 libs/libc/math/__cos.c                |   3 +-
 libs/libc/math/lib_asin.c             |   3 +-
 libs/libc/math/lib_asinf.c            |   3 +-
 libs/libc/math/lib_asinl.c            |   4 +-
 libs/libc/math/lib_erf.c              |   3 +-
 libs/libc/math/lib_erff.c             |   3 +-
 libs/libc/math/lib_erfl.c             |   6 +-
 libs/libc/math/lib_floorl.c           |   1 -
 libs/libc/math/lib_log.c              |   1 -
 libs/libc/math/lib_rint.c             |   4 +
 libs/libc/math/lib_rintf.c            |   4 +
 libs/libc/math/lib_rintl.c            |   4 +
 libs/libc/math/lib_sqrt.c             |   3 +-
 libs/libc/math/lib_sqrtl.c            |   9 +-
 libs/libc/math/lib_truncl.c           |   9 +-
 libs/libc/misc/lib_crc16.c            |  20 +-
 libs/libc/misc/lib_crc32.c            |   1 +
 libs/libc/misc/lib_crc8.c             |   2 +-
 libs/libc/misc/lib_envpath.c          |  17 +-
 libs/libc/misc/lib_kbddecode.c        |  10 +-
 libs/libc/misc/lib_kbdencode.c        |   6 +-
 libs/libc/misc/lib_ncompress.c        | 361 ++++++++++++++++++----------------
 libs/libc/misc/lib_slcddecode.c       |  11 +-
 libs/libc/net/lib_addrconfig.c        |   4 +
 libs/libc/net/lib_inetpton.c          |  25 ++-
 libs/libc/stdio/lib_lowoutstream.c    |   3 +-
 libs/libc/stdio/lib_ultoa_invert.c    |   1 +
 libs/libc/stdio/lib_vdprintf.c        |   6 +-
 libs/libc/stdio/lib_vfscanf.c         |   4 +-
 libs/libc/stdio/lib_vsnprintf.c       |   4 +-
 libs/libc/stdlib/lib_itoa.c           |   5 +-
 libs/libc/stdlib/lib_qsort.c          |   2 +-
 libs/libc/stdlib/lib_strtod.c         |  12 +-
 libs/libc/stdlib/lib_strtof.c         |  12 +-
 libs/libc/stdlib/lib_strtold.c        |  12 +-
 libs/libc/string/lib_explicit_bzero.c |   2 +-
 libs/libc/string/lib_memccpy.c        |   1 -
 libs/libc/string/lib_strtokr.c        |   2 +-
 libs/libc/string/lib_vikmemcpy.c      |   1 +
 libs/libc/wchar/lib_wcscmp.c          |   9 +-
 libs/libc/wchar/lib_wcscoll.c         |   4 +-
 libs/libc/wchar/lib_wcslcpy.c         |  10 +-
 libs/libc/wchar/lib_wcslen.c          |   2 +-
 libs/libc/wchar/lib_wcstoll.c         |   3 +-
 libs/libc/wchar/lib_wcstoul.c         |   3 +-
 libs/libc/wchar/lib_wcstoull.c        |   5 +-
 libs/libc/wchar/lib_wcsxfrm.c         |   8 +-
 libs/libc/wchar/lib_wmemchr.c         |   1 +
 libs/libc/wchar/lib_wmemmove.c        |   6 +-
 libs/libc/wctype/lib_iswctype.c       |  24 +--
 libs/libc/wctype/lib_towlower.c       |  24 +--
 libs/libc/wctype/lib_towupper.c       |  24 +--
 libs/libc/wctype/lib_wctype.c         |  24 +--
 53 files changed, 417 insertions(+), 314 deletions(-)

diff --git a/libs/libc/math/__cos.c b/libs/libc/math/__cos.c
index e91a6cc..1dd82b9 100644
--- a/libs/libc/math/__cos.c
+++ b/libs/libc/math/__cos.c
@@ -115,7 +115,8 @@ double __cos(double x, double y)
   z = x * x;
   w = z * z;
   r =
-    z * (g_c1 + z * (g_c2 + z * g_c3)) + w * w * (g_c4 + z * (g_c5 + z * g_c6));
+    z * (g_c1 + z * (g_c2 + z * g_c3)) +
+         w * w * (g_c4 + z * (g_c5 + z * g_c6));
   hz = 0.5 * z;
   w = 1.0 - hz;
 
diff --git a/libs/libc/math/lib_asin.c b/libs/libc/math/lib_asin.c
index 353105e..d534f99 100644
--- a/libs/libc/math/lib_asin.c
+++ b/libs/libc/math/lib_asin.c
@@ -56,7 +56,8 @@
 static double asin_aux(double x)
 {
   long double y;
-  double y_cos, y_sin;
+  double y_cos;
+  double y_sin;
 
   y = 0.0;
   y_sin = 0.0;
diff --git a/libs/libc/math/lib_asinf.c b/libs/libc/math/lib_asinf.c
index b63fae9..c97a8d8 100644
--- a/libs/libc/math/lib_asinf.c
+++ b/libs/libc/math/lib_asinf.c
@@ -44,7 +44,8 @@
 static float asinf_aux(float x)
 {
   double y;
-  float  y_sin, y_cos;
+  float y_sin;
+  float y_cos;
 
   y = 0.0;
   y_sin = 0.0F;
diff --git a/libs/libc/math/lib_asinl.c b/libs/libc/math/lib_asinl.c
index ed56114..2e523d6 100644
--- a/libs/libc/math/lib_asinl.c
+++ b/libs/libc/math/lib_asinl.c
@@ -43,7 +43,9 @@
 
 static long double asinl_aux(long double x)
 {
-  long double y, y_cos, y_sin;
+  long double y;
+  long double y_cos;
+  long double y_sin;
 
   y = 0.0;
   y_sin = 0.0;
diff --git a/libs/libc/math/lib_erf.c b/libs/libc/math/lib_erf.c
index 5c530dc..10b3c6f 100644
--- a/libs/libc/math/lib_erf.c
+++ b/libs/libc/math/lib_erf.c
@@ -77,7 +77,8 @@ double erf(double x)
 
   z = fabs(x);
   t = 1.0 / (1.0 + P * z);
-  t = 1.0 - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * exp(-z * z);
+  t = 1.0 -
+      (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * exp(-z * z);
   return copysign(t, x);
 }
 
diff --git a/libs/libc/math/lib_erff.c b/libs/libc/math/lib_erff.c
index 3fef882..3dad93d 100644
--- a/libs/libc/math/lib_erff.c
+++ b/libs/libc/math/lib_erff.c
@@ -75,6 +75,7 @@ float erff(float x)
 
   z = fabsf(x);
   t = 1.0F / (1.0F + P * z);
-  t = 1.0F - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * expf(-z * z);
+  t = 1.0F -
+      (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * expf(-z * z);
   return copysignf(t, x);
 }
diff --git a/libs/libc/math/lib_erfl.c b/libs/libc/math/lib_erfl.c
index 645e2cb..02c5115 100644
--- a/libs/libc/math/lib_erfl.c
+++ b/libs/libc/math/lib_erfl.c
@@ -61,11 +61,13 @@ long double erfl(long double x)
    * erf comes from formula 7.1.26
    */
 
-  long double t, z;
+  long double t;
+  long double z;
 
   z = fabsl(x);
   t = 1.0 / (1.0 + P * z);
-  t = 1.0 - (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * expl(-z * z);
+  t = 1.0 -
+      (((((A5 * t + A4) * t) + A3) * t + A2) * t + A1) * t * expl(-z * z);
   return copysignl(t, x);
 }
 #endif
diff --git a/libs/libc/math/lib_floorl.c b/libs/libc/math/lib_floorl.c
index 265822f..1e1d147 100644
--- a/libs/libc/math/lib_floorl.c
+++ b/libs/libc/math/lib_floorl.c
@@ -62,6 +62,5 @@ long double floorl(long double x)
     }
 
   return modx;
-
 }
 #endif
diff --git a/libs/libc/math/lib_log.c b/libs/libc/math/lib_log.c
index c39e9e8..ba7aae3 100644
--- a/libs/libc/math/lib_log.c
+++ b/libs/libc/math/lib_log.c
@@ -72,7 +72,6 @@ double log(double x)
   iter         = 0;
   relax_factor = 1;
 
-
   while (y > y_old + epsilon || y < y_old - epsilon)
     {
       y_old = y;
diff --git a/libs/libc/math/lib_rint.c b/libs/libc/math/lib_rint.c
index c6eff84..2d8a64d 100644
--- a/libs/libc/math/lib_rint.c
+++ b/libs/libc/math/lib_rint.c
@@ -71,6 +71,10 @@
  * Private Data
  ****************************************************************************/
 
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
 double rint(double x)
 {
   long   linteger;
diff --git a/libs/libc/math/lib_rintf.c b/libs/libc/math/lib_rintf.c
index c832d28..9a38497 100644
--- a/libs/libc/math/lib_rintf.c
+++ b/libs/libc/math/lib_rintf.c
@@ -71,6 +71,10 @@
  * Private Data
  ****************************************************************************/
 
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
 float rintf(float x)
 {
   long  linteger;
diff --git a/libs/libc/math/lib_rintl.c b/libs/libc/math/lib_rintl.c
index 421a6c6..d044618 100644
--- a/libs/libc/math/lib_rintl.c
+++ b/libs/libc/math/lib_rintl.c
@@ -71,6 +71,10 @@
  * Private Data
  ****************************************************************************/
 
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
 long double rintl(long double x)
 {
   int64_t     llinteger;
diff --git a/libs/libc/math/lib_sqrt.c b/libs/libc/math/lib_sqrt.c
index 36f5b45..2ef0a1f 100644
--- a/libs/libc/math/lib_sqrt.c
+++ b/libs/libc/math/lib_sqrt.c
@@ -44,7 +44,8 @@
 #ifdef CONFIG_HAVE_DOUBLE
 double sqrt(double x)
 {
-  long double y, y1;
+  long double y;
+  long double y1;
 
   if (x < 0.0)
     {
diff --git a/libs/libc/math/lib_sqrtl.c b/libs/libc/math/lib_sqrtl.c
index a25a1e1..029fb10 100644
--- a/libs/libc/math/lib_sqrtl.c
+++ b/libs/libc/math/lib_sqrtl.c
@@ -44,7 +44,8 @@
 #ifdef CONFIG_HAVE_LONG_DOUBLE
 long double sqrtl(long double x)
 {
-  long double y, y1;
+  long double y;
+  long double y1;
 
   /* Filter out invalid/trivial inputs */
 
@@ -56,17 +57,17 @@ long double sqrtl(long double x)
 
   if (isnan(x))
     {
-    return NAN;
+      return NAN;
     }
 
   if (isinf(x))
     {
-    return INFINITY;
+      return INFINITY;
     }
 
   if (x == 0.0)
     {
-    return 0.0;
+      return 0.0;
     }
 
   /* Guess square root (using bit manipulation) */
diff --git a/libs/libc/math/lib_truncl.c b/libs/libc/math/lib_truncl.c
index 81bfe78..7a32983 100644
--- a/libs/libc/math/lib_truncl.c
+++ b/libs/libc/math/lib_truncl.c
@@ -59,9 +59,10 @@ union ldshape
 long double truncl(long double x)
 {
   union ldshape u =
-  {
-    x
-  };
+    {
+      x
+    };
+
   int e = u.i.se & 0x7fff;
   int s = u.i.se >> 15;
   long double y;
@@ -78,7 +79,7 @@ long double truncl(long double x)
 
       __x = (x + 0x1p120f);
       UNUSED(__x);
-      return x*0;
+      return x * 0;
     }
 
   /* y = int(|x|) - |x|, where int(|x|) is an integer neighbor of |x| */
diff --git a/libs/libc/misc/lib_crc16.c b/libs/libc/misc/lib_crc16.c
index 692e4f7..c9f96e8 100644
--- a/libs/libc/misc/lib_crc16.c
+++ b/libs/libc/misc/lib_crc16.c
@@ -6,19 +6,14 @@
  *   Copyright (C) 2013 Gregory Nutt. All rights reserved.
  *   Author: Gregory Nutt <gn...@nuttx.org>
  *
- * References:
- *
- *   crc16_tab calculated by Mark G. Mendel, Network Systems Corporation.
- *   crc16part() logic derived from article Copyright (C) 1986 Stephen Satchell.
- *
  * "Programmers may incorporate any or all code into their programs,
  *  giving proper credit within the source. Publication of the
  *  source routines is permitted so long as proper credit is given
  *  to Stephen Satchell, Satchell Evaluations and Chuck Forsberg,
  *  Omen Technology."
  *
- * Re-released under the Modified BSD license which, I believe, is consistent with the
- * original authors' intent:
+ * Re-released under the Modified BSD license which, I believe, is
+ * consistent with the original authors' intent:
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -49,6 +44,13 @@
  *
  ************************************************************************************************/
 
+/* References:
+ *
+ *   crc16_tab calculated by Mark G. Mendel, Network Systems Corporation.
+ *   crc16part() logic derived from article Copyright (C) 1986 Stephen
+ *    Satchell.
+ */
+
 /************************************************************************************************
  * Included Files
  ************************************************************************************************/
@@ -102,6 +104,7 @@ static uint16_t crc16_tab[256] =
 /************************************************************************************************
  * Public Functions
  ************************************************************************************************/
+
 /************************************************************************************************
  * Name: crc16part
  *
@@ -116,7 +119,8 @@ uint16_t crc16part(FAR const uint8_t *src, size_t len, uint16_t crc16val)
 
   for (i = 0; i < len; i++)
     {
-      crc16val = crc16_tab[((crc16val >> 8) & 0xff) ^ src[i]] ^ (crc16val << 8);
+      crc16val = crc16_tab[((crc16val >> 8) & 0xff) ^
+                 src[i]] ^ (crc16val << 8);
     }
 
   return crc16val;
diff --git a/libs/libc/misc/lib_crc32.c b/libs/libc/misc/lib_crc32.c
index 0015ec5..908022a 100644
--- a/libs/libc/misc/lib_crc32.c
+++ b/libs/libc/misc/lib_crc32.c
@@ -90,6 +90,7 @@ static const uint32_t crc32_tab[] =
 /************************************************************************************************
  * Public Functions
  ************************************************************************************************/
+
 /************************************************************************************************
  * Name: crc32part
  *
diff --git a/libs/libc/misc/lib_crc8.c b/libs/libc/misc/lib_crc8.c
index 8eeb0e1..dc90ba6 100644
--- a/libs/libc/misc/lib_crc8.c
+++ b/libs/libc/misc/lib_crc8.c
@@ -52,7 +52,7 @@
 /****************************************************************************
  * CRC8 table generated with:
  *
- *   #define POLY 0xB2   // ((uint8_t) 0x14D) ^ 0xFF
+ *   #define POLY 0xB2    ((uint8_t) 0x14D) ^ 0xFF
  *
  *   printf("    ");
  *   for (y = 0; y < 256; y++)
diff --git a/libs/libc/misc/lib_envpath.c b/libs/libc/misc/lib_envpath.c
index efe4f36..c357807 100644
--- a/libs/libc/misc/lib_envpath.c
+++ b/libs/libc/misc/lib_envpath.c
@@ -188,18 +188,19 @@ FAR char *envpath_next(ENVPATH_HANDLE handle, FAR const char *relpath)
 
       path = envpath->next;
       if (*path == '\0')
-       {
-          /* If it points to a NULL it means that either (1) the PATH varialbe
-           * is empty, or (2) we have already examined all of the paths in the
-           * path variable.
+        {
+          /* If it points to a NULL it means that either (1) the PATH
+           * varialbe is empty, or (2) we have already examined all of the
+           * paths in the path variable.
            */
 
           return (FAR char *)NULL;
-       }
+        }
 
-      /* Okay... 'path' points to the beginning of the string.  The string may
-       * be terminated either with (1) ':' which separates the path from the
-       * next path in the list, or (2) NUL which marks the end of the list.
+      /* Okay... 'path' points to the beginning of the string.  The string
+       * may be terminated either with (1) ':' which separates the path from
+       * the next path in the list, or (2) NUL which marks the end of the
+       * list.
        */
 
       endptr = strchr(path, ':');
diff --git a/libs/libc/misc/lib_kbddecode.c b/libs/libc/misc/lib_kbddecode.c
index 1e055a7..c80abe9 100644
--- a/libs/libc/misc/lib_kbddecode.c
+++ b/libs/libc/misc/lib_kbddecode.c
@@ -94,9 +94,9 @@ static int kbd_reget(FAR struct kbd_getstate_s *state, FAR uint8_t *pch)
   /* Return the next character */
 
   *pch = state->buf[state->ndx];
-   state->ndx++;
-   state->nch--;
-   return KBD_PRESS;
+  state->ndx++;
+  state->nch--;
+  return KBD_PRESS;
 }
 
 /****************************************************************************
@@ -169,7 +169,9 @@ int kbd_decode(FAR struct lib_instream_s *stream,
 
       if (ch != ASCII_ESC)
         {
-          /* Not the beginning of an escape sequence.  Return the character. */
+          /* Not the beginning of an escape sequence.
+           *  Return the character.
+           */
 
           return kbd_reget(state, pch);
         }
diff --git a/libs/libc/misc/lib_kbdencode.c b/libs/libc/misc/lib_kbdencode.c
index 999cb18..237898b 100644
--- a/libs/libc/misc/lib_kbdencode.c
+++ b/libs/libc/misc/lib_kbdencode.c
@@ -122,7 +122,8 @@ void kbd_release(uint8_t ch, FAR struct lib_outstream_s *stream)
 void kbd_specpress(enum kbd_keycode_e keycode,
                    FAR struct lib_outstream_s *stream)
 {
-  DEBUGASSERT(stream && keycode >= KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
+  DEBUGASSERT(stream && keycode >=
+              KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
   kbd_encode((uint8_t)keycode, stream, ('a' + KBD_SPECPRESS));
 }
 
@@ -146,6 +147,7 @@ void kbd_specpress(enum kbd_keycode_e keycode,
 void kbd_specrel(enum kbd_keycode_e keycode,
                  FAR struct lib_outstream_s *stream)
 {
-  DEBUGASSERT(stream && keycode >= KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
+  DEBUGASSERT(stream && keycode >=
+              KEYCODE_FWDDEL && keycode <= LAST_KEYCODE);
   kbd_encode((uint8_t)keycode, stream, ('a' + KBD_SPECREL));
 }
diff --git a/libs/libc/misc/lib_ncompress.c b/libs/libc/misc/lib_ncompress.c
index a106b36..d7e3ae9 100644
--- a/libs/libc/misc/lib_ncompress.c
+++ b/libs/libc/misc/lib_ncompress.c
@@ -1,4 +1,3 @@
-
 /****************************************************************************
  * libs/libc/misc/lib_ncompress.c
  * File compression ala IEEE Computer, Mar 1992.
@@ -50,6 +49,10 @@
  *
  ****************************************************************************/
 
+/****************************************************************************
+ * Included Files
+ ****************************************************************************/
+
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <stdint.h>
@@ -63,6 +66,10 @@
 #include <signal.h>
 #include <errno.h>
 
+/****************************************************************************
+ * Pre-processor Definitions
+ ****************************************************************************/
+
 #define RECURSIVE  1
 
 #ifdef __STDC__
@@ -97,34 +104,37 @@
        /* Defines for third byte of header */
 #define MAGIC_1  (char_type)'\037'      /* First byte of compressed file */
 #define MAGIC_2  (char_type)'\235'      /* Second byte of compressed file */
-#define BIT_MASK 0x1f           /* Mask for 'number of compression bits' */
-         /* Masks 0x20 and 0x40 are free.  */
-         /* I think 0x20 should mean that there is */
-         /* a fourth header byte (for expansion).  */
-#define BLOCK_MODE 0x80         /* Block compression if table is full and */
-         /* compression rate is dropping flush tables */
-
-   /* the next two codes should not be changed lightly, as they must not */
-   /* lie within the contiguous general code space.  */
+
+#define BIT_MASK 0x1f      /* Mask for 'number of compression bits' */
+                           /* Masks 0x20 and 0x40 are free.  */
+                           /* I think 0x20 should mean that there is */
+                           /* a fourth header byte (for expansion).  */
+
+#define BLOCK_MODE 0x80    /* Block compression if table is full and */
+                           /* compression rate is dropping flush tables */
+
+/* the next two codes should not be changed lightly, as they must not
+ * lie within the contiguous general code space.
+ */
 #define FIRST 257               /* first free entry */
 #define CLEAR 256               /* table clear output code */
 
 #define INIT_BITS 9             /* initial number of bits/code */
 
 #ifndef SACREDMEM
- /*
-  * SACREDMEM is the amount of physical memory saved for others; compress
-  * will hog the rest.
-  */
+
+/* SACREDMEM is the amount of physical memory saved for others; compress
+ * will hog the rest.
+ */
 #  define SACREDMEM 0
 #endif
 
 #ifndef USERMEM
- /*
-  * Set USERMEM to the maximum amount of physical user memory available
-  * in bytes.  USERMEM is used to determine the maximum BITS that can be used
-  * for compression.
-  */
+
+/* Set USERMEM to the maximum amount of physical user memory available
+ * in bytes.  USERMEM is used to determine the maximum BITS that can be used
+ * for compression.
+ */
 #  define USERMEM  450000       /* default user memory */
 #endif
 
@@ -136,9 +146,7 @@
 #  define NOALLIGN 0
 #endif
 
-/*
- * machine variants which require cc -Dmachine:  pdp11, z8000, DOS
- */
+/* machine variants which require cc -Dmachine:  pdp11, z8000, DOS */
 
 #ifdef interdata                /* Perkin-Elmer */
 #  define SIGNED_COMPARE_SLOW   /* signed compare is slower than unsigned */
@@ -315,16 +323,17 @@ int quiet = 1;                  /* don't tell me about compression */
 int do_decomp = 0;              /* Decompress mode */
 int force = 0;                  /* Force overwrite of files and links */
 int nomagic = 0;                /* Use a 3-byte magic number header, */
+
          /* unless old file */
-int block_mode = BLOCK_MODE;    /* Block compress mode -C compatible with 2.0 */
-int maxbits = BITS;             /* user settable max # bits/code */
-int zcat_flg = 0;               /* Write output on stdout, suppress messages */
-int recursive = 0;              /* compress directories */
-int exit_code = -1;             /* Exitcode of compress (-1 no file compressed)
-                                 */
 
-char_type inbuf[IBUFSIZ + 64];  /* Input buffer */
-char_type outbuf[OBUFSIZ + 2048];       /* Output buffer */
+int block_mode = BLOCK_MODE;  /* Block compress mode -C compatible with 2.0 */
+int maxbits = BITS;           /* user settable max # bits/code */
+int zcat_flg = 0;             /* Write output on stdout, suppress messages */
+int recursive = 0;            /* compress directories */
+int exit_code = -1;           /* Exitcode of compress (-1 no file compressed) */
+
+char_type inbuf[IBUFSIZ + 64];       /* Input buffer */
+char_type outbuf[OBUFSIZ + 2048];    /* Output buffer */
 
 struct stat infstat;            /* Input file status */
 char *ifname;                   /* Input filename */
@@ -335,8 +344,7 @@ int fgnd_flag = 0;              /* Running in background (SIGINT=SIGIGN) */
 long bytes_in;                  /* Total number of byte from input */
 long bytes_out;                 /* Total number of byte to output */
 
-/*
- * To save much memory, we overlay the table used by compress() with those
+/* To save much memory, we overlay the table used by compress() with those
  * used by decompress().  The tab_prefix table is the same size and type
  * as the codetab.  The tab_suffix table needs 2**BITS characters.  We
  * get this from the beginning of htab.  The output stack uses the rest
@@ -354,7 +362,9 @@ count_int htab6[8192];
 count_int htab7[8192];
 count_int htab8[HSIZE - 65536];
 count_int *htab[9] =
-  { htab0, htab1, htab2, htab3, htab4, htab5, htab6, htab7, htab8 };
+{
+  htab0, htab1, htab2, htab3, htab4, htab5, htab6, htab7, htab8
+};
 
 unsigned short code0tab[16384];
 unsigned short code1tab[16384];
@@ -362,7 +372,9 @@ unsigned short code2tab[16384];
 unsigned short code3tab[16384];
 unsigned short code4tab[16384];
 unsigned short *codetab[5] =
-  { code0tab, code1tab, code2tab, code3tab, code4tab };
+{
+  code0tab, code1tab, code2tab, code3tab, code4tab
+};
 
 #  define htabof(i)   (htab[(i) >> 13][(i) & 0x1fff])
 #  define codetabof(i)  (codetab[(i) >> 14][(i) & 0x3fff])
@@ -433,8 +445,11 @@ int primetab[256] =             /* Special secudary hash table.  */
 };
 #  endif
 
-/*
- * compress fdin to fdout
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
+
+/* compress fdin to fdout
  *
  * Algorithm:  use open addressing double hashing (no chaining) on the
  * prefix code / next character combination.  We do a variant of Knuth's
@@ -448,6 +463,7 @@ int primetab[256] =             /* Special secudary hash table.  */
  * file size for noticeable speed improvement on small files.  Please direct
  * questions about this implementation to ames!jaw.
  */
+
 void compress(int fdin, int fdout)
 {
   long hp;
@@ -531,7 +547,9 @@ void compress(int fdin, int fdout)
               checkpoint = bytes_in + CHECK_GAP;
 
               if (bytes_in > 0x007fffff)
-                {               /* shift will overflow */
+                {
+                  /* shift will overflow */
+
                   rat = (bytes_out + (outbits >> 3)) >> 8;
 
                   if (rat == 0) /* Don't divide by zero */
@@ -540,10 +558,11 @@ void compress(int fdin, int fdout)
                     rat = bytes_in / rat;
                 }
               else
-                rat = (bytes_in << 8) / (bytes_out + (outbits >> 3));   /* 8
-                                                                         * fractional
-                                                                         * bits
-                                                                         */
+
+                  /* 8 fractional bits */
+
+                  rat = (bytes_in << 8) / (bytes_out + (outbits >> 3));
+
               if (rat >= ratio)
                 ratio = (int)rat;
               else
@@ -574,106 +593,108 @@ void compress(int fdin, int fdout)
               memset(outbuf + (outbits >> 3) + 1, '\0', OBUFSIZ);
             }
 
-          {
-            int i;
+            {
+              int i;
 
-            i = rsize - rlop;
+              i = rsize - rlop;
 
-            if ((code_int) i > extcode - free_ent)
-              i = (int)(extcode - free_ent);
-            if (i > ((sizeof(outbuf) - 32) * 8 - outbits) / n_bits)
-              i = ((sizeof(outbuf) - 32) * 8 - outbits) / n_bits;
+              if ((code_int) i > extcode - free_ent)
+                i = (int)(extcode - free_ent);
+              if (i > ((sizeof(outbuf) - 32) * 8 - outbits) / n_bits)
+                i = ((sizeof(outbuf) - 32) * 8 - outbits) / n_bits;
 
-            if (!stcode && (long)i > checkpoint - bytes_in)
-              i = (int)(checkpoint - bytes_in);
+              if (!stcode && (long)i > checkpoint - bytes_in)
+                i = (int)(checkpoint - bytes_in);
 
-            rlop += i;
-            bytes_in += i;
-          }
+              rlop += i;
+              bytes_in += i;
+            }
 
           goto next;
         hfound:fcode.e.ent = codetabof(hp);
         next:if (rpos >= rlop)
-            goto endlop;
+          goto endlop;
         next2:fcode.e.c = inbuf[rpos++];
 #  ifndef FAST
-          {
-            code_int i;
-            fc = fcode.code;
+            {
+              code_int i;
+              fc = fcode.code;
 
-            hp = (((long)(fcode.e.c)) << (BITS - 8)) ^ (long)(fcode.e.ent);
+              hp = (((long)(fcode.e.c)) << (BITS - 8)) ^ (long)(fcode.e.ent);
 
-            if ((i = htabof(hp)) == fc)
-              goto hfound;
+              if ((i = htabof(hp)) == fc)
+                  goto hfound;
 
-            if (i != -1)
-              {
-                long disp;
+              if (i != -1)
+                {
+                  long disp;
 
-                disp = (HSIZE - hp) - 1;        /* secondary hash (after G.
-                                                 * Knott) */
+                  disp = (HSIZE - hp) - 1;        /* secondary hash (after G.
+                                                   * Knott) */
 
-                do
-                  {
-                    if ((hp -= disp) < 0)
-                      hp += HSIZE;
+                  do
+                    {
+                      if ((hp -= disp) < 0)
+                          hp += HSIZE;
 
-                    if ((i = htabof(hp)) == fc)
-                      goto hfound;
-                  }
-                while (i != -1);
-              }
-          }
+                      if ((i = htabof(hp)) == fc)
+                          goto hfound;
+                    }
+                  while (i != -1);
+                }
+            }
 #  else
-          {
-            long i;
-            long p;
-            fc = fcode.code;
-
-            hp = ((((long)(fcode.e.c)) << (HBITS - 8)) ^ (long)(fcode.e.ent));
-
-            if ((i = htabof(hp)) == fc)
-              goto hfound;
-            if (i == -1)
-              goto out;
-
-            p = primetab[fcode.e.c];
-          lookup:hp = (hp + p) & HMASK;
-            if ((i = htabof(hp)) == fc)
-              goto hfound;
-            if (i == -1)
-              goto out;
-            hp = (hp + p) & HMASK;
-            if ((i = htabof(hp)) == fc)
-              goto hfound;
-            if (i == -1)
-              goto out;
-            hp = (hp + p) & HMASK;
-            if ((i = htabof(hp)) == fc)
-              goto hfound;
-            if (i == -1)
-              goto out;
-            goto lookup;
-          }
-        out:;
+            {
+              long i;
+              long p;
+              fc = fcode.code;
+
+              hp = ((((long)(fcode.e.c)) << (HBITS - 8)) ^
+                      (long)(fcode.e.ent));
+
+              if ((i = htabof(hp)) == fc)
+                  goto hfound;
+              if (i == -1)
+                  goto out;
+
+              p = primetab[fcode.e.c];
+              lookup:hp = (hp + p) & HMASK;
+              if ((i = htabof(hp)) == fc)
+                  goto hfound;
+              if (i == -1)
+                  goto out;
+              hp = (hp + p) & HMASK;
+              if ((i = htabof(hp)) == fc)
+                  goto hfound;
+              if (i == -1)
+                  goto out;
+              hp = (hp + p) & HMASK;
+              if ((i = htabof(hp)) == fc)
+                  goto hfound;
+              if (i == -1)
+                  goto out;
+              goto lookup;
+            }
+
+      out:;
 #  endif
           output(outbuf, outbits, fcode.e.ent, n_bits);
 
-          {
-            long fc = fcode.code;
-            fcode.e.ent = fcode.e.c;
+            {
+              long fc = fcode.code;
+              fcode.e.ent = fcode.e.c;
 
-            if (stcode)
-              {
-                codetabof(hp) = (unsigned short)free_ent++;
-                htabof(hp) = fc;
-              }
-          }
+              if (stcode)
+                {
+                  codetabof(hp) = (unsigned short)free_ent++;
+                  htabof(hp) = fc;
+                }
+            }
 
           goto next;
 
         endlop:if (fcode.e.ent >= FIRST && rpos < rsize)
-            goto next2;
+              goto next2;
 
           if (rpos > rlop)
             {
@@ -681,6 +702,7 @@ void compress(int fdin, int fdout)
               rlop = rpos;
             }
         }
+
       while (rlop < rsize);
     }
 
@@ -698,8 +720,7 @@ void compress(int fdin, int fdout)
   return;
 }
 
-/*
- * Decompress stdin to stdout.  This routine adapts to the codes in the
+/* Decompress stdin to stdout.  This routine adapts to the codes in the
  * file building the "string" table on-the-fly; requiring no table to
  * be stored in the compressed file.  The tables used herein are shared
  * with those of the compress() routine.  See the definitions above.
@@ -779,21 +800,21 @@ void decompress(int fdin, int fdout)
 
   do
     {
-    resetbuf:;
-      {
-        int i;
-        int e;
-        int o;
+      resetbuf:;
+        {
+          int i;
+          int e;
+          int o;
 
-        o = posbits >> 3;
-        e = o <= insize ? insize - o : 0;
+          o = posbits >> 3;
+          e = o <= insize ? insize - o : 0;
 
-        for (i = 0; i < e; ++i)
-          inbuf[i] = inbuf[i + o];
+          for (i = 0; i < e; ++i)
+            inbuf[i] = inbuf[i + o];
 
-        insize = e;
-        posbits = 0;
-      }
+          insize = e;
+          posbits = 0;
+        }
 
       if (insize < sizeof(inbuf) - IBUFSIZ)
         {
@@ -834,7 +855,9 @@ void decompress(int fdin, int fdout)
                   fprintf(stderr, "uncompress: corrupt input\n");
                   abort_compress();
                 }
-              outbuf[outpos++] = (char_type) (finchar = (int)(oldcode = code));
+
+              outbuf[outpos++] =
+                        (char_type)(finchar = (int)(oldcode = code));
               continue;
             }
 
@@ -863,8 +886,9 @@ void decompress(int fdin, int fdout)
                   p = &inbuf[posbits >> 3];
 
                   fprintf(stderr,
-                          "insize:%d posbits:%d inbuf:%02X %02X %02X %02X %02X (%d)\n",
-                          insize, posbits, p[-1], p[0], p[1], p[2], p[3],
+                          "insize:%d posbits:%d "
+                          "inbuf:%02X %02X %02X %02X %02X (%d)\n",
+                           insize, posbits, p[1], p[0], p[1], p[2], p[3],
                           (posbits & 07));
                   fprintf(stderr, "uncompress: corrupt input\n");
                   abort_compress();
@@ -874,8 +898,10 @@ void decompress(int fdin, int fdout)
               code = oldcode;
             }
 
+          /* Generate output characters in reverse order */
+
           while ((cmp_code_int) code >= (cmp_code_int) 256)
-            {                   /* Generate output characters in reverse order */
+            {
               *--stackp = tab_suffixof(code);
               code = tab_prefixof(code);
             }
@@ -884,39 +910,40 @@ void decompress(int fdin, int fdout)
 
           /* And put them out in forward order */
 
-          {
-            int i;
-
-            if (outpos + (i = (de_stack - stackp)) >= OBUFSIZ)
-              {
-                do
-                  {
-                    if (i > OBUFSIZ - outpos)
-                      i = OBUFSIZ - outpos;
-
-                    if (i > 0)
-                      {
-                        memcpy(outbuf + outpos, stackp, i);
-                        outpos += i;
-                      }
-
-                    if (outpos >= OBUFSIZ)
-                      {
-                        if (write(fdout, outbuf, outpos) != outpos)
-                          write_error();
-
-                        outpos = 0;
-                      }
-                    stackp += i;
-                  }
-                while ((i = (de_stack - stackp)) > 0);
-              }
-            else
-              {
-                memcpy(outbuf + outpos, stackp, i);
-                outpos += i;
-              }
-          }
+            {
+              int i;
+
+              if (outpos + (i = (de_stack - stackp)) >= OBUFSIZ)
+                {
+                  do
+                    {
+                      if (i > OBUFSIZ - outpos)
+                        i = OBUFSIZ - outpos;
+
+                      if (i > 0)
+                        {
+                          memcpy(outbuf + outpos, stackp, i);
+                          outpos += i;
+                        }
+
+                      if (outpos >= OBUFSIZ)
+                        {
+                          if (write(fdout, outbuf, outpos) != outpos)
+                            write_error();
+
+                          outpos = 0;
+                        }
+
+                      stackp += i;
+                    }
+                  while ((i = (de_stack - stackp)) > 0);
+                }
+              else
+                {
+                  memcpy(outbuf + outpos, stackp, i);
+                  outpos += i;
+                }
+            }
 
           if ((code = free_ent) < maxmaxcode)   /* Generate the new entry. */
             {
diff --git a/libs/libc/misc/lib_slcddecode.c b/libs/libc/misc/lib_slcddecode.c
index 342f86ff..796693e 100644
--- a/libs/libc/misc/lib_slcddecode.c
+++ b/libs/libc/misc/lib_slcddecode.c
@@ -53,7 +53,7 @@
  * Pre-processor Definitions
  ****************************************************************************/
 
-/* Indices, counts, helper macros ******************************************/
+/* Indices, counts, helper macros *******************************************/
 
 #define NDX_ESC        0
 #define NDX_BRACKET    1
@@ -134,11 +134,11 @@ static enum slcdret_e slcd_reget(FAR struct slcdstate_s *state,
   *pch = state->buf[state->ndx];
   *parg = 0;
 
-   /* Bump up the indices and return false (meaning a normal character) */
+  /* Bump up the indices and return false (meaning a normal character) */
 
-   state->ndx++;
-   state->nch--;
-   return SLCDRET_CHAR;
+  state->ndx++;
+  state->nch--;
+  return SLCDRET_CHAR;
 }
 
 /****************************************************************************
@@ -173,7 +173,6 @@ static enum slcdret_e slcd_reget(FAR struct slcdstate_s *state,
 enum slcdret_e slcd_decode(FAR struct lib_instream_s *stream,
                            FAR struct slcdstate_s *state, FAR uint8_t *pch,
                            FAR uint8_t *parg)
-
 {
   enum slcdcode_e code;
   uint8_t count;
diff --git a/libs/libc/net/lib_addrconfig.c b/libs/libc/net/lib_addrconfig.c
index e98c06d..c6f5832 100644
--- a/libs/libc/net/lib_addrconfig.c
+++ b/libs/libc/net/lib_addrconfig.c
@@ -48,3 +48,7 @@
  ****************************************************************************/
 
 const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
+
+/****************************************************************************
+ * Public Functions
+ ****************************************************************************/
diff --git a/libs/libc/net/lib_inetpton.c b/libs/libc/net/lib_inetpton.c
index 3fc0cd4..f2733d6 100644
--- a/libs/libc/net/lib_inetpton.c
+++ b/libs/libc/net/lib_inetpton.c
@@ -83,9 +83,9 @@
  *
  * Input Parameters:
  *   src  - The src argument points to the string being passed in.
- *   dest - The dest argument points to a numstr into which the function stores
- *          the numeric address; this must be large enough to hold the numeric
- *          address (32 bits for AF_INET, 128 bits for AF_INET6).
+ *   dest - The dest argument points to a numstr into which the function
+ *          stores the numeric address; this must be large enough to hold the
+ *          numeric address (32 bits for AF_INET, 128 bits for AF_INET6).
  *
  * Returned Value:
  *   inet_ipv4_pton() will returns 1 if the conversion succeeds. It will
@@ -193,9 +193,9 @@ static int inet_ipv4_pton(FAR const char *src, FAR void *dest)
  *
  * Input Parameters:
  *   src  - The src argument points to the string being passed in.
- *   dest - The dest argument points to a numstr into which the function stores
- *          the numeric address; this must be large enough to hold the numeric
- *          address (32 bits for AF_INET, 128 bits for AF_INET6).
+ *   dest - The dest argument points to a numstr into which the function
+ *          stores the numeric address; this must be large enough to hold the
+ *          numeric address (32 bits for AF_INET, 128 bits for AF_INET6).
  *
  * Returned Value:
  *   inet_ipv6_pton() will returns 1 if the conversion succeeds. It will
@@ -324,7 +324,6 @@ static int inet_ipv6_pton(FAR const char *src, FAR void *dest)
         }
     }
 
-
   /* Return zero if there is any problem parsing the input */
 
   return 0;
@@ -373,15 +372,15 @@ static int inet_ipv6_pton(FAR const char *src, FAR void *dest)
  *          AF_INET or AF_INET6.
  *   src  - The src argument points to the string being passed in.
  *   dest - The dest argument points to memory into which the function stores
- *          the numeric address; this must be large enough to hold the numeric
- *          address (32 bits for AF_INET, 128 bits for AF_INET6).
+ *          the numeric address; this must be large enough to hold the
+ *          numeric address (32 bits for AF_INET, 128 bits for AF_INET6).
  *
  * Returned Value:
  *   The inet_pton() function returns 1 if the conversion succeeds, with the
- *   address pointed to by dest in network byte order. It will return 0 if the
- *   input is not a valid IPv4 dotted-decimal string or a valid IPv6 address
- *   string, or -1 with errno set to EAFNOSUPPORT if the af argument is
- *   unknown.
+ *   address pointed to by dest in network byte order. It will return 0 if
+ *   the input is not a valid IPv4 dotted-decimal string or a valid IPv6
+ *   address string, or -1 with errno set to EAFNOSUPPORT if the af argument
+ *   is unknown.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/stdio/lib_lowoutstream.c b/libs/libc/stdio/lib_lowoutstream.c
index 0c84b2c..89197e4 100644
--- a/libs/libc/stdio/lib_lowoutstream.c
+++ b/libs/libc/stdio/lib_lowoutstream.c
@@ -1,7 +1,8 @@
 /****************************************************************************
  * libs/libc/stdio/lib_lowoutstream.c
  *
- *   Copyright (C) 2007-2009, 2011-2012, 2017 Gregory Nutt. All rights reserved.
+ *   Copyright (C) 2007-2009, 2011-2012, 2017 Gregory Nutt.
+ *   All rights reserved.
  *   Author: Gregory Nutt <gn...@nuttx.org>
  *
  * Redistribution and use in source and binary forms, with or without
diff --git a/libs/libc/stdio/lib_ultoa_invert.c b/libs/libc/stdio/lib_ultoa_invert.c
index 91df893..ae35b96 100644
--- a/libs/libc/stdio/lib_ultoa_invert.c
+++ b/libs/libc/stdio/lib_ultoa_invert.c
@@ -56,6 +56,7 @@ FAR char *__ultoa_invert(unsigned long val, FAR char *str, int base)
       upper = 1;
       base &= ~XTOA_UPPER;
     }
+
   do
     {
       int v;
diff --git a/libs/libc/stdio/lib_vdprintf.c b/libs/libc/stdio/lib_vdprintf.c
index 8c4892f..90a4b23 100644
--- a/libs/libc/stdio/lib_vdprintf.c
+++ b/libs/libc/stdio/lib_vdprintf.c
@@ -2,7 +2,7 @@
  * libs/libc/stdio/lib_vdprintf.c
  *
  *   Copyright (C) 2012 Andrew Tridgell. All rights reserved.
- *   Authors: Author: Andrew Tridgell <an...@tridgell.net>
+ *   Authors: Andrew Tridgell <an...@tridgell.net>
  *            Gregory Nutt <gn...@nuttx.org>
  *
  * Redistribution and use in source and binary forms, with or without
@@ -54,6 +54,6 @@ int vdprintf(int fd, FAR const IPTR char *fmt, va_list ap)
 
   /* Wrap the fd in a stream object and let lib_vsprintf do the work. */
 
-   lib_rawoutstream(&rawoutstream, fd);
-   return lib_vsprintf(&rawoutstream.public, fmt, ap);
+  lib_rawoutstream(&rawoutstream, fd);
+  return lib_vsprintf(&rawoutstream.public, fmt, ap);
 }
diff --git a/libs/libc/stdio/lib_vfscanf.c b/libs/libc/stdio/lib_vfscanf.c
index d07b23d..e4d7939 100644
--- a/libs/libc/stdio/lib_vfscanf.c
+++ b/libs/libc/stdio/lib_vfscanf.c
@@ -66,8 +66,8 @@ int vfscanf(FAR FILE *stream, FAR const IPTR char *fmt, va_list ap)
       lib_stdinstream(&stdinstream, stream);
 
       /* Hold the stream semaphore throughout the lib_vscanf call so that
-       * this thread can get its entire message out before being pre-empted by
-       * the next thread.
+       * this thread can get its entire message out before being pre-empted
+       * by the next thread.
        */
 
       lib_take_semaphore(stream);
diff --git a/libs/libc/stdio/lib_vsnprintf.c b/libs/libc/stdio/lib_vsnprintf.c
index b779b1c..65b979c 100644
--- a/libs/libc/stdio/lib_vsnprintf.c
+++ b/libs/libc/stdio/lib_vsnprintf.c
@@ -66,8 +66,8 @@ int vsnprintf(FAR char *buf, size_t size, FAR const IPTR char *format,
 
   /* "If the value of [size] is zero on a call to vsnprintf(), nothing shall
    *  be written, the number of bytes that would have been written had [size]
-   *  been sufficiently large excluding the terminating null shall be returned,
-   *  and [buf] may be a null pointer." -- opengroup.org
+   *  been sufficiently large excluding the terminating null shall be
+   *  returned, and [buf] may be a null pointer." -- opengroup.org
    */
 
   if (size > 0)
diff --git a/libs/libc/stdlib/lib_itoa.c b/libs/libc/stdlib/lib_itoa.c
index 40d576a..a1eb52d 100644
--- a/libs/libc/stdlib/lib_itoa.c
+++ b/libs/libc/stdlib/lib_itoa.c
@@ -52,7 +52,10 @@
 FAR char *itoa(int val, FAR char *str, int base)
 {
   static FAR const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
-  int intval = abs(val), digit, pos, len;
+  int intval = abs(val);
+  int digit;
+  int pos;
+  int len;
   FAR char *buf = str;
   char swap;
 
diff --git a/libs/libc/stdlib/lib_qsort.c b/libs/libc/stdlib/lib_qsort.c
index 76f549e..293b4b0 100644
--- a/libs/libc/stdlib/lib_qsort.c
+++ b/libs/libc/stdlib/lib_qsort.c
@@ -196,7 +196,7 @@ loop:
         }
 
       return;
-  }
+    }
 
   pm = (FAR char *)base + (nel / 2) * width;
   if (nel > 7)
diff --git a/libs/libc/stdlib/lib_strtod.c b/libs/libc/stdlib/lib_strtod.c
index 2a43e63..57f6078 100644
--- a/libs/libc/stdlib/lib_strtod.c
+++ b/libs/libc/stdlib/lib_strtod.c
@@ -71,7 +71,7 @@
 
 static inline int is_real(double x)
 {
-  const double infinite = 1.0/0.0;
+  const double infinite = 1.0 / 0.0;
   return (x < infinite) && (x >= -infinite);
 }
 
@@ -97,7 +97,7 @@ double strtod(FAR const char *str, FAR char **endptr)
   int n;
   int num_digits;
   int num_decimals;
-  const double infinite = 1.0/0.0;
+  const double infinite = 1.0 / 0.0;
 
   /* Skip leading whitespace */
 
@@ -113,10 +113,14 @@ double strtod(FAR const char *str, FAR char **endptr)
     {
     case '-':
       negative = 1; /* Fall through to increment position */
+
       /* FALLTHROUGH */
+
     case '+':
       p++;
+
       /* FALLTHROUGH */
+
     default:
       break;
     }
@@ -177,10 +181,14 @@ double strtod(FAR const char *str, FAR char **endptr)
         {
         case '-':
           negative = 1;   /* Fall through to increment pos */
+
           /* FALLTHROUGH */
+
         case '+':
           p++;
+
           /* FALLTHROUGH */
+
         default:
           break;
         }
diff --git a/libs/libc/stdlib/lib_strtof.c b/libs/libc/stdlib/lib_strtof.c
index bf6becc..2c65bd2 100644
--- a/libs/libc/stdlib/lib_strtof.c
+++ b/libs/libc/stdlib/lib_strtof.c
@@ -73,7 +73,7 @@
 
 static inline int is_real(float x)
 {
-  const float infinite = 1.0F/0.0F;
+  const float infinite = 1.0F / 0.0F;
   return (x < infinite) && (x >= -infinite);
 }
 
@@ -99,7 +99,7 @@ float strtof(FAR const char *str, FAR char **endptr)
   int n;
   int num_digits;
   int num_decimals;
-  const float infinite = 1.0F/0.0F;
+  const float infinite = 1.0F / 0.0F;
 
   /* Skip leading whitespace */
 
@@ -115,10 +115,14 @@ float strtof(FAR const char *str, FAR char **endptr)
     {
     case '-':
       negative = 1; /* Fall through to increment position */
+
       /* FALLTHROUGH */
+
     case '+':
       p++;
+
       /* FALLTHROUGH */
+
     default:
       break;
     }
@@ -179,10 +183,14 @@ float strtof(FAR const char *str, FAR char **endptr)
         {
         case '-':
           negative = 1;   /* Fall through to increment pos */
+
           /* FALLTHROUGH */
+
         case '+':
           p++;
+
           /* FALLTHROUGH */
+
         default:
           break;
         }
diff --git a/libs/libc/stdlib/lib_strtold.c b/libs/libc/stdlib/lib_strtold.c
index 53c9107..322685f 100644
--- a/libs/libc/stdlib/lib_strtold.c
+++ b/libs/libc/stdlib/lib_strtold.c
@@ -71,7 +71,7 @@
 
 static inline int is_real(long double x)
 {
-  const long double infinite = 1.0L/0.0L;
+  const long double infinite = 1.0L / 0.0L;
   return (x < infinite) && (x >= -infinite);
 }
 
@@ -97,7 +97,7 @@ long double strtold(FAR const char *str, FAR char **endptr)
   int n;
   int num_digits;
   int num_decimals;
-  const long double infinite = 1.0L/0.0L;
+  const long double infinite = 1.0L / 0.0L;
 
   /* Skip leading whitespace */
 
@@ -113,10 +113,14 @@ long double strtold(FAR const char *str, FAR char **endptr)
     {
     case '-':
       negative = 1; /* Fall through to increment position */
+
       /* FALLTHROUGH */
+
     case '+':
       p++;
+
       /* FALLTHROUGH */
+
     default:
       break;
     }
@@ -177,10 +181,14 @@ long double strtold(FAR const char *str, FAR char **endptr)
         {
         case '-':
           negative = 1;   /* Fall through to increment pos */
+
           /* FALLTHROUGH */
+
         case '+':
           p++;
+
           /* FALLTHROUGH */
+
         default:
           break;
         }
diff --git a/libs/libc/string/lib_explicit_bzero.c b/libs/libc/string/lib_explicit_bzero.c
index 3b0dde0..251788c 100644
--- a/libs/libc/string/lib_explicit_bzero.c
+++ b/libs/libc/string/lib_explicit_bzero.c
@@ -41,7 +41,7 @@
 #include <string.h>
 
 /****************************************************************************
- * Global Functions
+ * Public Functions
  ****************************************************************************/
 
 /* memset that must not be optimized away by compiler (not even with LTO). */
diff --git a/libs/libc/string/lib_memccpy.c b/libs/libc/string/lib_memccpy.c
index 5f71277..c9393bb 100644
--- a/libs/libc/string/lib_memccpy.c
+++ b/libs/libc/string/lib_memccpy.c
@@ -45,7 +45,6 @@
  * Public Functions
  ****************************************************************************/
 
-
 /****************************************************************************
  * Name: memccpy
  *
diff --git a/libs/libc/string/lib_strtokr.c b/libs/libc/string/lib_strtokr.c
index 6ed8bda..d6d5f04 100644
--- a/libs/libc/string/lib_strtokr.c
+++ b/libs/libc/string/lib_strtokr.c
@@ -133,7 +133,6 @@ FAR char *strtok_r(FAR char *str, FAR const char *delim, FAR char **saveptr)
        *pend && strchr(delim, *pend) == NULL;
        pend++);
 
-
   /* pend either points to the end of the string or to
    * the first delimiter after the string.
    */
@@ -153,5 +152,6 @@ FAR char *strtok_r(FAR char *str, FAR const char *delim, FAR char **saveptr)
     {
       *saveptr = pend;
     }
+
   return pbegin;
 }
diff --git a/libs/libc/string/lib_vikmemcpy.c b/libs/libc/string/lib_vikmemcpy.c
index abc0c3f..94a51bd 100644
--- a/libs/libc/string/lib_vikmemcpy.c
+++ b/libs/libc/string/lib_vikmemcpy.c
@@ -294,6 +294,7 @@ typedef uint32_t            UIntN;
 /****************************************************************************
  * Public Functions
  ****************************************************************************/
+
 /****************************************************************************
  * Name: memcpy
  *
diff --git a/libs/libc/wchar/lib_wcscmp.c b/libs/libc/wchar/lib_wcscmp.c
index fb1beff..788aa77 100644
--- a/libs/libc/wchar/lib_wcscmp.c
+++ b/libs/libc/wchar/lib_wcscmp.c
@@ -49,10 +49,11 @@
  *
  * Description:
  *   The wcscmp() function returns zero if the wide-character strings at s1
- *   and s2 are equal. It returns an integer greater than zero if at the first
- *   differing position i, the corresponding wide-character s1[i] is greater
- *   than s2[i].  It returns an integer less than zero if at the first differ-
- *   ing position i, the corresponding wide-character s1[i] is less than s2[i]
+ *   and s2 are equal. It returns an integer greater than zero if at the
+ *   first differing position i, the corresponding wide-character s1[i] is
+ *   greater than s2[i].  It returns an integer less than zero if at the
+ *   first differing position i, the corresponding wide-character s1[i] is
+ *   less than s2[i]
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wchar/lib_wcscoll.c b/libs/libc/wchar/lib_wcscoll.c
index 991010a..590eb73 100644
--- a/libs/libc/wchar/lib_wcscoll.c
+++ b/libs/libc/wchar/lib_wcscoll.c
@@ -49,8 +49,8 @@
  *
  * Description:
  *   The wcscoll() compares the wide-character string pointed to by a to the
- *   wide-character string pointed to by b using an interpretation appropriate
- *   to the current LC_COLLATE state.
+ *   wide-character string pointed to by b using an interpretation
+ *   appropriate to the current LC_COLLATE state.
  *
  *   The current implementation of wcscoll() simply uses wcscmp() and does
  *   not support any language-specific sorting.
diff --git a/libs/libc/wchar/lib_wcslcpy.c b/libs/libc/wchar/lib_wcslcpy.c
index 5ffa0d0..d64d35f 100644
--- a/libs/libc/wchar/lib_wcslcpy.c
+++ b/libs/libc/wchar/lib_wcslcpy.c
@@ -21,11 +21,11 @@
  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
  * THE AUTHOR 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.
+ * 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wchar/lib_wcslen.c b/libs/libc/wchar/lib_wcslen.c
index 4745d6a..85ec852 100644
--- a/libs/libc/wchar/lib_wcslen.c
+++ b/libs/libc/wchar/lib_wcslen.c
@@ -26,7 +26,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  *
- *	citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
+ * citrus Id: wcslen.c,v 1.1 1999/12/29 21:47:45 tshiozak Exp
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wchar/lib_wcstoll.c b/libs/libc/wchar/lib_wcstoll.c
index 1cb3a02..cf5b24e 100644
--- a/libs/libc/wchar/lib_wcstoll.c
+++ b/libs/libc/wchar/lib_wcstoll.c
@@ -52,7 +52,8 @@
  *
  ****************************************************************************/
 
-long long int wcstoll(FAR const wchar_t *nptr, FAR wchar_t **endptr, int base)
+long long int wcstoll(FAR const wchar_t *nptr,
+                      FAR wchar_t **endptr, int base)
 {
   return strtoll((FAR const char *)nptr, (FAR char **)endptr, base);
 }
diff --git a/libs/libc/wchar/lib_wcstoul.c b/libs/libc/wchar/lib_wcstoul.c
index 23a3e23..b2bca7c 100644
--- a/libs/libc/wchar/lib_wcstoul.c
+++ b/libs/libc/wchar/lib_wcstoul.c
@@ -52,7 +52,8 @@
  *
  ****************************************************************************/
 
-unsigned long int wcstoul(FAR const wchar_t *nptr, FAR wchar_t **endptr, int base)
+unsigned long int wcstoul(FAR const wchar_t *nptr,
+                          FAR wchar_t **endptr, int base)
 {
   return strtoul((const char *)nptr, (char **)endptr, base);
 }
diff --git a/libs/libc/wchar/lib_wcstoull.c b/libs/libc/wchar/lib_wcstoull.c
index 1bc9fa2..2ae1a54 100644
--- a/libs/libc/wchar/lib_wcstoull.c
+++ b/libs/libc/wchar/lib_wcstoull.c
@@ -47,8 +47,9 @@
  * Name: wcstoull
  *
  * Description:
- *   The wcstoull() function is the wide-character equivalent of the strtoull()
- *   function. It converts a wchar string to unsigned long long value.
+ *   The wcstoull() function is the wide-character equivalent of the
+ *   strtoull() function. It converts a wchar string to unsigned long long
+ *   value.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wchar/lib_wcsxfrm.c b/libs/libc/wchar/lib_wcsxfrm.c
index 459150a..f8be0ec 100644
--- a/libs/libc/wchar/lib_wcsxfrm.c
+++ b/libs/libc/wchar/lib_wcsxfrm.c
@@ -48,10 +48,10 @@
  * Name: wcsxfrm
  *
  * Description:
- *   The wcsxfrm() transforms the wide-character string pointed to by b to the
- *   wide-character string pointed to by a, comparing two transformed wide
- *   strings with wcscmp() should return the same result as comparing the
- *   original strings with wcscoll().
+ *   The wcsxfrm() transforms the wide-character string pointed to by b to
+ *   the wide-character string pointed to by a, comparing two transformed
+ *   wide strings with wcscmp() should return the same result as comparing
+ *   the original strings with wcscoll().
  *   No more than n wide characters are transformed, including the trailing
  *   null character. The current implementation of wcsxfrm() simply uses
  *   wcslcpy() and does not support any language-specific transformations.
diff --git a/libs/libc/wchar/lib_wmemchr.c b/libs/libc/wchar/lib_wmemchr.c
index 3c9b147..38c9747 100644
--- a/libs/libc/wchar/lib_wmemchr.c
+++ b/libs/libc/wchar/lib_wmemchr.c
@@ -65,6 +65,7 @@ FAR wchar_t *wmemchr(FAR const wchar_t *s, wchar_t c, size_t n)
 
           return (FAR wchar_t *) s;
         }
+
       s++;
     }
 
diff --git a/libs/libc/wchar/lib_wmemmove.c b/libs/libc/wchar/lib_wmemmove.c
index ff0f4fe..4b97732 100644
--- a/libs/libc/wchar/lib_wmemmove.c
+++ b/libs/libc/wchar/lib_wmemmove.c
@@ -46,9 +46,9 @@
  * Name: wmemmove
  *
  * Description:
- *   The wmemmove() function is the wide-character equivalent of the memmove()
- *   function. It copies n wide characters from the array starting at src to
- *   the array starting at dest.  The arrays may overlap.
+ *   The wmemmove() function is the wide-character equivalent of the
+ *   memmove() function. It copies n wide characters from the array starting
+ *   at src to the array starting at dest.  The arrays may overlap.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wctype/lib_iswctype.c b/libs/libc/wctype/lib_iswctype.c
index ababe81..afccb8a 100644
--- a/libs/libc/wctype/lib_iswctype.c
+++ b/libs/libc/wctype/lib_iswctype.c
@@ -5,7 +5,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:
  *
  *   Redistributions of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
@@ -18,16 +19,17 @@
  *   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 RED HAT INCORPORATED 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 RED HAT INCORPORATED 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wctype/lib_towlower.c b/libs/libc/wctype/lib_towlower.c
index 19295e7..34da0c7 100644
--- a/libs/libc/wctype/lib_towlower.c
+++ b/libs/libc/wctype/lib_towlower.c
@@ -5,7 +5,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:
  *
  *   Redistributions of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
@@ -18,16 +19,17 @@
  *   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 RED HAT INCORPORATED 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 RED HAT INCORPORATED 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wctype/lib_towupper.c b/libs/libc/wctype/lib_towupper.c
index b54a511..acdd54c 100644
--- a/libs/libc/wctype/lib_towupper.c
+++ b/libs/libc/wctype/lib_towupper.c
@@ -5,7 +5,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:
  *
  *   Redistributions of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
@@ -18,16 +19,17 @@
  *   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 RED HAT INCORPORATED 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 RED HAT INCORPORATED 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/wctype/lib_wctype.c b/libs/libc/wctype/lib_wctype.c
index 4342931..84b2c1f 100644
--- a/libs/libc/wctype/lib_wctype.c
+++ b/libs/libc/wctype/lib_wctype.c
@@ -5,7 +5,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:
  *
  *   Redistributions of source code must retain the above copyright
  *   notice, this list of conditions and the following disclaimer.
@@ -18,16 +19,17 @@
  *   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 RED HAT INCORPORATED 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 RED HAT INCORPORATED 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.
  *
  ****************************************************************************/
 

[incubator-nuttx] 03/04: libs: libc: lib_vikmemcpy.c: Mixed case identifier fix

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 d3313eeae96f925e447fc3c43d2a607ba120f283
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 2 08:57:44 2021 +0200

    libs: libc: lib_vikmemcpy.c: Mixed case identifier fix
    
    fix Mixed case identifier reported by nxstyle
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 libs/libc/string/lib_vikmemcpy.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/libs/libc/string/lib_vikmemcpy.c b/libs/libc/string/lib_vikmemcpy.c
index 94a51bd..3e93b17 100644
--- a/libs/libc/string/lib_vikmemcpy.c
+++ b/libs/libc/string/lib_vikmemcpy.c
@@ -203,8 +203,8 @@
 
 #define COPY_NO_SHIFT()                                           \
 {                                                                 \
-  UIntN* dstN = (UIntN*)(dst8 PRE_LOOP_ADJUST);                   \
-  UIntN* srcN = (UIntN*)(src8 PRE_LOOP_ADJUST);                   \
+  uintn* dstN = (uintn*)(dst8 PRE_LOOP_ADJUST);                   \
+  uintn* srcN = (uintn*)(src8 PRE_LOOP_ADJUST);                   \
   size_t length = count / TYPE_WIDTH;                             \
                                                                   \
   while (length & 7)                                              \
@@ -240,13 +240,13 @@
 
 #define COPY_SHIFT(shift)                                         \
 {                                                                 \
-  UIntN* dstN  = (UIntN*)((((uintptr_t)dst8) PRE_LOOP_ADJUST) &   \
+  uintn* dstN  = (uintn*)((((uintptr_t)dst8) PRE_LOOP_ADJUST) &   \
                            ~(TYPE_WIDTH - 1));                    \
-  UIntN* srcN  = (UIntN*)((((uintptr_t)src8) PRE_LOOP_ADJUST) &   \
+  uintn* srcN  = (uintn*)((((uintptr_t)src8) PRE_LOOP_ADJUST) &   \
                            ~(TYPE_WIDTH - 1));                    \
   size_t length  = count / TYPE_WIDTH;                            \
-  UIntN srcWord = INC_VAL(srcN);                                  \
-  UIntN dstWord;                                                  \
+  uintn srcWord = INC_VAL(srcN);                                  \
+  uintn dstWord;                                                  \
                                                                   \
   while (length & 7)                                              \
     {                                                             \
@@ -284,10 +284,10 @@
  ****************************************************************************/
 
 #ifdef CONFIG_MEMCPY_64BIT
-typedef uint64_t            UIntN;
+typedef uint64_t            uintn;
 #  define TYPE_WIDTH        8L
 #else
-typedef uint32_t            UIntN;
+typedef uint32_t            uintn;
 #  define TYPE_WIDTH        4L
 #endif
 

[incubator-nuttx] 04/04: libs: Gregory Nutt: update licenses to Apache

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 b7c451c5a457352c029f440a5e2ed9f2335cdbc5
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 2 09:22:52 2021 +0200

    libs: Gregory Nutt: update licenses to Apache
    
    Gregory Nutt has submitted the SGA and we can migrate the licenses
     to Apache.
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 libs/libc/machine/sim/arch_elf.c   | 39 ++++++++++--------------------
 libs/libc/machine/x86/arch_elf.c   | 39 ++++++++++--------------------
 libs/libc/math/lib_rint.c          | 39 ++++++++++--------------------
 libs/libc/math/lib_rintf.c         | 39 ++++++++++--------------------
 libs/libc/math/lib_rintl.c         | 39 ++++++++++--------------------
 libs/libc/misc/lib_debug.c         | 40 ++++++++++---------------------
 libs/libc/misc/lib_envpath.c       | 39 ++++++++++--------------------
 libs/libc/misc/lib_filesem.c       | 39 ++++++++++--------------------
 libs/libc/misc/lib_mkfifo.c        | 39 ++++++++++--------------------
 libs/libc/misc/lib_sendfile.c      | 39 ++++++++++--------------------
 libs/libc/misc/lib_stream.c        | 40 ++++++++++---------------------
 libs/libc/misc/lib_streamsem.c     | 39 ++++++++++--------------------
 libs/libc/misc/lib_tea_decrypt.c   | 49 +++++++++++++-------------------------
 libs/libc/misc/lib_tea_encrypt.c   | 49 +++++++++++++-------------------------
 libs/libc/misc/lib_uadd32x64.c     | 39 ++++++++++--------------------
 libs/libc/misc/lib_uadd64.c        | 39 ++++++++++--------------------
 libs/libc/misc/lib_umul32.c        | 39 ++++++++++--------------------
 libs/libc/misc/lib_umul32x64.c     | 39 ++++++++++--------------------
 libs/libc/misc/lib_umul64.c        | 39 ++++++++++--------------------
 libs/libc/misc/lib_usub64.c        | 39 ++++++++++--------------------
 libs/libc/misc/lib_usub64x32.c     | 39 ++++++++++--------------------
 libs/libc/signal/sig_emptyset.c    | 43 +++++++++++----------------------
 libs/libc/spawn/lib_psfa_addopen.c | 39 ++++++++++--------------------
 libs/libc/stdio/lib_libsnoflush.c  | 43 +++++++++++----------------------
 libs/libc/stdio/lib_lowoutstream.c | 40 ++++++++++---------------------
 libs/libc/stdio/lib_vsnprintf.c    | 39 ++++++++++--------------------
 libs/libc/stdlib/lib_strtol.c      | 39 ++++++++++--------------------
 libs/libc/string/lib_memccpy.c     | 39 ++++++++++--------------------
 libs/libc/string/lib_strncpy.c     | 39 ++++++++++--------------------
 libs/libc/string/lib_strtok.c      | 39 ++++++++++--------------------
 libs/libc/string/lib_strtokr.c     | 39 ++++++++++--------------------
 libs/libnx/nxcontext.h             | 39 ++++++++++--------------------
 32 files changed, 398 insertions(+), 881 deletions(-)

diff --git a/libs/libc/machine/sim/arch_elf.c b/libs/libc/machine/sim/arch_elf.c
index c599564..d1cf3eb 100644
--- a/libs/libc/machine/sim/arch_elf.c
+++ b/libs/libc/machine/sim/arch_elf.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/machine/sim/arch_elf.c
  *
- *   Copyright (C) 2012, 2014, 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/machine/x86/arch_elf.c b/libs/libc/machine/x86/arch_elf.c
index f3fadfa..87893d8 100644
--- a/libs/libc/machine/x86/arch_elf.c
+++ b/libs/libc/machine/x86/arch_elf.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/machine/x86/arch_elf.c
  *
- *   Copyright (C) 2012, 2014, 2016-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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/math/lib_rint.c b/libs/libc/math/lib_rint.c
index 2d8a64d..6b65fbc 100644
--- a/libs/libc/math/lib_rint.c
+++ b/libs/libc/math/lib_rint.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/math/lib_rint.c
  *
- *   Copyright (C) 2007, 2011, 2014 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/math/lib_rintf.c b/libs/libc/math/lib_rintf.c
index 9a38497..84e01e0 100644
--- a/libs/libc/math/lib_rintf.c
+++ b/libs/libc/math/lib_rintf.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/math/lib_rintf.c
  *
- *   Copyright (C) 2014 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/math/lib_rintl.c b/libs/libc/math/lib_rintl.c
index d044618..bb23983 100644
--- a/libs/libc/math/lib_rintl.c
+++ b/libs/libc/math/lib_rintl.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/math/lib_rintl.c
  *
- *   Copyright (C) 2007, 2011, 2014 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_debug.c b/libs/libc/misc/lib_debug.c
index ef68c26..de48731 100644
--- a/libs/libc/misc/lib_debug.c
+++ b/libs/libc/misc/lib_debug.c
@@ -1,36 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_debug.c
  *
- *   Copyright (C) 2007-2009, 2011-2012, 2016, 2018-2019 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_envpath.c b/libs/libc/misc/lib_envpath.c
index c357807..461f5ac 100644
--- a/libs/libc/misc/lib_envpath.c
+++ b/libs/libc/misc/lib_envpath.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_envpath.c
  *
- *   Copyright (C) 2012, 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_filesem.c b/libs/libc/misc/lib_filesem.c
index 480d35c..bbe63b3 100644
--- a/libs/libc/misc/lib_filesem.c
+++ b/libs/libc/misc/lib_filesem.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_filesem.c
  *
- *   Copyright (C) 2007, 2009, 2011, 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_mkfifo.c b/libs/libc/misc/lib_mkfifo.c
index 1d743e6..f237ff5 100644
--- a/libs/libc/misc/lib_mkfifo.c
+++ b/libs/libc/misc/lib_mkfifo.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_mkfifo.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_sendfile.c b/libs/libc/misc/lib_sendfile.c
index ad0f9f5..b7f9d0d 100644
--- a/libs/libc/misc/lib_sendfile.c
+++ b/libs/libc/misc/lib_sendfile.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_sendfile.c
  *
- *   Copyright (C) 2007, 2009, 2011, 2013 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_stream.c b/libs/libc/misc/lib_stream.c
index cd07f5e..125a2f5 100644
--- a/libs/libc/misc/lib_stream.c
+++ b/libs/libc/misc/lib_stream.c
@@ -1,36 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_stream.c
  *
- *   Copyright (C) 2007, 2011, 2013-2014, 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_streamsem.c b/libs/libc/misc/lib_streamsem.c
index 3b23482..b733353 100644
--- a/libs/libc/misc/lib_streamsem.c
+++ b/libs/libc/misc/lib_streamsem.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_streamsem.c
  *
- *   Copyright (C) 2007, 2009, 2011, 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_tea_decrypt.c b/libs/libc/misc/lib_tea_decrypt.c
index 6a2056e..57de189 100644
--- a/libs/libc/misc/lib_tea_decrypt.c
+++ b/libs/libc/misc/lib_tea_decrypt.c
@@ -1,43 +1,28 @@
 /****************************************************************************
  * libs/libc/misc/lib_tea_decrypt.c
- * Tiny Encryption Algorithm - Decryption support
  *
- *   Copyright (C) 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
  *
- * https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm:  "Following is
- * an adaptation of the reference encryption and decryption routines in C,
- * released into the public domain by David Wheeler and Roger Needham."
- *
- * 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.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
  *
  ****************************************************************************/
 
+/* https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm:  "Following is
+ * an adaptation of the reference encryption and decryption routines in C,
+ * released into the public domain by David Wheeler and Roger Needham."
+ */
+
 /****************************************************************************
  * Included Files
  ****************************************************************************/
diff --git a/libs/libc/misc/lib_tea_encrypt.c b/libs/libc/misc/lib_tea_encrypt.c
index dc0a26f..216418d 100644
--- a/libs/libc/misc/lib_tea_encrypt.c
+++ b/libs/libc/misc/lib_tea_encrypt.c
@@ -1,43 +1,28 @@
 /****************************************************************************
  * libs/libc/misc/lib_tea_encrypt.c
- * Tiny Encryption Algorithm - Encryption support
  *
- *   Copyright (C) 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
  *
- * https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm:  "Following is
- * an adaptation of the reference encryption and decryption routines in C,
- * released into the public domain by David Wheeler and Roger Needham."
- *
- * 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.
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * 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.
  *
  ****************************************************************************/
 
+/* https://en.wikipedia.org/wiki/Tiny_Encryption_Algorithm:  "Following is
+ * an adaptation of the reference encryption and decryption routines in C,
+ * released into the public domain by David Wheeler and Roger Needham."
+ */
+
 /****************************************************************************
  * Included Files
  ****************************************************************************/
diff --git a/libs/libc/misc/lib_uadd32x64.c b/libs/libc/misc/lib_uadd32x64.c
index 26e6fdf..77446ba 100644
--- a/libs/libc/misc/lib_uadd32x64.c
+++ b/libs/libc/misc/lib_uadd32x64.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_uadd32x64.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_uadd64.c b/libs/libc/misc/lib_uadd64.c
index 32163a0..70991bb 100644
--- a/libs/libc/misc/lib_uadd64.c
+++ b/libs/libc/misc/lib_uadd64.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_uadd64.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_umul32.c b/libs/libc/misc/lib_umul32.c
index a1594e9..693d925 100644
--- a/libs/libc/misc/lib_umul32.c
+++ b/libs/libc/misc/lib_umul32.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_umul32.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_umul32x64.c b/libs/libc/misc/lib_umul32x64.c
index 7466496..09f7b9f 100644
--- a/libs/libc/misc/lib_umul32x64.c
+++ b/libs/libc/misc/lib_umul32x64.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_umul32x64.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_umul64.c b/libs/libc/misc/lib_umul64.c
index 7b820e3..415afa2 100644
--- a/libs/libc/misc/lib_umul64.c
+++ b/libs/libc/misc/lib_umul64.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_umul64.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_usub64.c b/libs/libc/misc/lib_usub64.c
index efca5f0..dac0d8b 100644
--- a/libs/libc/misc/lib_usub64.c
+++ b/libs/libc/misc/lib_usub64.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_usub64.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/misc/lib_usub64x32.c b/libs/libc/misc/lib_usub64x32.c
index 277abce..df8e226 100644
--- a/libs/libc/misc/lib_usub64x32.c
+++ b/libs/libc/misc/lib_usub64x32.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/misc/lib_usub64x32.c
  *
- *   Copyright (C) 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/signal/sig_emptyset.c b/libs/libc/signal/sig_emptyset.c
index 71decef..a1a8516 100644
--- a/libs/libc/signal/sig_emptyset.c
+++ b/libs/libc/signal/sig_emptyset.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/signal/sig_emptyset.c
  *
- *   Copyright (C) 2007, 2008, 2011 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/spawn/lib_psfa_addopen.c b/libs/libc/spawn/lib_psfa_addopen.c
index e66a059..8ae60d9 100644
--- a/libs/libc/spawn/lib_psfa_addopen.c
+++ b/libs/libc/spawn/lib_psfa_addopen.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/spawn/lib_psfa_addopen.c
  *
- *   Copyright (C) 2013 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/stdio/lib_libsnoflush.c b/libs/libc/stdio/lib_libsnoflush.c
index 1db4ef3..0170356 100644
--- a/libs/libc/stdio/lib_libsnoflush.c
+++ b/libs/libc/stdio/lib_libsnoflush.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/stdio/lib_libsnoflush.c
  *
- *   Copyright (C) 2014, 2017 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/stdio/lib_lowoutstream.c b/libs/libc/stdio/lib_lowoutstream.c
index 89197e4..ef279aa 100644
--- a/libs/libc/stdio/lib_lowoutstream.c
+++ b/libs/libc/stdio/lib_lowoutstream.c
@@ -1,36 +1,20 @@
 /****************************************************************************
  * libs/libc/stdio/lib_lowoutstream.c
  *
- *   Copyright (C) 2007-2009, 2011-2012, 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/stdio/lib_vsnprintf.c b/libs/libc/stdio/lib_vsnprintf.c
index 65b979c..7745814 100644
--- a/libs/libc/stdio/lib_vsnprintf.c
+++ b/libs/libc/stdio/lib_vsnprintf.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/stdio/lib_vsnprintf.c
  *
- *   Copyright (C) 2007-2009, 2011 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/stdlib/lib_strtol.c b/libs/libc/stdlib/lib_strtol.c
index 7412d96..a517ad8 100644
--- a/libs/libc/stdlib/lib_strtol.c
+++ b/libs/libc/stdlib/lib_strtol.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/stdlib/lib_strtol.c
  *
- *   Copyright (C) 2007, 2009, 2011, 2019 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/string/lib_memccpy.c b/libs/libc/string/lib_memccpy.c
index c9393bb..6b82152 100644
--- a/libs/libc/string/lib_memccpy.c
+++ b/libs/libc/string/lib_memccpy.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/string/lib_memccpy.c
  *
- *   Copyright (C) 2012 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/string/lib_strncpy.c b/libs/libc/string/lib_strncpy.c
index b026352..90acbad 100644
--- a/libs/libc/string/lib_strncpy.c
+++ b/libs/libc/string/lib_strncpy.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/string/lib_strncpy.c
  *
- *   Copyright (C) 2007, 2011, 2014 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/string/lib_strtok.c b/libs/libc/string/lib_strtok.c
index 8c39a63..4556d0e 100644
--- a/libs/libc/string/lib_strtok.c
+++ b/libs/libc/string/lib_strtok.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/string/lib_strtok.c
  *
- *   Copyright (C) 2007, 2008, 2011 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libc/string/lib_strtokr.c b/libs/libc/string/lib_strtokr.c
index d6d5f04..5193b83 100644
--- a/libs/libc/string/lib_strtokr.c
+++ b/libs/libc/string/lib_strtokr.c
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libc/string/lib_strtokr.c
  *
- *   Copyright (C) 2007, 2008, 2011 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.
  *
  ****************************************************************************/
 
diff --git a/libs/libnx/nxcontext.h b/libs/libnx/nxcontext.h
index dbdeb88..91ab9e3 100644
--- a/libs/libnx/nxcontext.h
+++ b/libs/libnx/nxcontext.h
@@ -1,35 +1,20 @@
 /****************************************************************************
  * libs/libnx/nxcontext.h
  *
- *   Copyright (C) 2013 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: net: fix nxstyle errors

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 8975a651971534c1df3e92e8cb21a0d3c3bad514
Author: Alin Jerpelea <al...@sony.com>
AuthorDate: Fri Apr 2 07:28:21 2021 +0200

    net: fix nxstyle errors
    
    fix errors reported by nxstyle
    
    Signed-off-by: Alin Jerpelea <al...@sony.com>
---
 net/sixlowpan/sixlowpan_hc06.c | 118 ++++++++++++++++++++++++++---------------
 net/sixlowpan/sixlowpan_hc1.c  |  21 +++++---
 net/udp/udp_devpoll.c          |   6 +--
 net/udp/udp_input.c            |   4 +-
 net/usrsock/usrsock_connect.c  |   3 +-
 net/usrsock/usrsock_poll.c     |  12 +++--
 6 files changed, 105 insertions(+), 59 deletions(-)

diff --git a/net/sixlowpan/sixlowpan_hc06.c b/net/sixlowpan/sixlowpan_hc06.c
index 1222588..5899679 100644
--- a/net/sixlowpan/sixlowpan_hc06.c
+++ b/net/sixlowpan/sixlowpan_hc06.c
@@ -233,7 +233,9 @@ static FAR struct sixlowpan_addrcontext_s *
 #if CONFIG_NET_6LOWPAN_MAXADDRCONTEXT > 0
   int i;
 
-  /* Remove code to avoid warnings and save flash if no address context is used */
+  /* Remove code to avoid warnings and save flash if no address context is
+   * used
+   */
 
   for (i = 0; i < CONFIG_NET_6LOWPAN_MAXADDRCONTEXT; i++)
     {
@@ -241,7 +243,8 @@ static FAR struct sixlowpan_addrcontext_s *
           net_ipv6addr_prefixcmp(&g_hc06_addrcontexts[i].prefix, ipaddr, 64))
         {
           ninfo("Context found for "
-                "ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x Context: %d\n",
+                "ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x "
+                "Context: %d\n",
                 ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]),
                 ntohs(ipaddr[3]), ntohs(ipaddr[4]), ntohs(ipaddr[5]),
                 ntohs(ipaddr[6]), ntohs(ipaddr[7]),
@@ -266,24 +269,26 @@ static FAR struct sixlowpan_addrcontext_s *
  *   prefpost takes a byte where the first nibble specify prefix count
  *   and the second postfix count (NOTE: 15/0xf ipaddr=16 bytes copy).
  *
- *   compress_tagaddr() accepts a remote, variable length, tagged MAC address;
+ *   compress_tagaddr() accepts a remote, variable length, tagged MAC
+ *                      address;
  *   compress_laddr() accepts a local, fixed length MAC address.
  *   compress_ipaddr() is simply the common logic that does not depend on
  *   the size of the MAC address.
  *
  ****************************************************************************/
 
-static uint8_t compress_ipaddr(FAR const net_ipv6addr_t ipaddr, uint8_t bitpos)
+static uint8_t compress_ipaddr(FAR const net_ipv6addr_t ipaddr,
+                               uint8_t bitpos)
 {
   if (SIXLOWPAN_IS_IID_16BIT_COMPRESSABLE(ipaddr))
     {
       /* Compress IID to 16 bits: xxxx:xxxx:xxxx:xxxx:0000:00ff:fe00:XXXX */
 
 #ifdef CONFIG_ENDIAN_BIG
-      *g_hc06ptr++ = ipaddr[7] >> 8;        /* Preserve big-endian, network order */
+      *g_hc06ptr++ = ipaddr[7] >> 8;   /* Preserve big-endian, network order */
       *g_hc06ptr++ = ipaddr[7] & 0xff;
 #else
-      *g_hc06ptr++ = ipaddr[7] & 0xff;      /* Preserve big-endian, network order */
+      *g_hc06ptr++ = ipaddr[7] & 0xff; /* Preserve big-endian, network order */
       *g_hc06ptr++ = ipaddr[7] >> 8;
 #endif
 
@@ -319,8 +324,10 @@ static uint8_t compress_tagaddr(FAR const net_ipv6addr_t ipaddr,
 #ifdef CONFIG_DEBUG_NET_INFO
   ninfo("Compressing bitpos=%u addrlen=%u\n", bitpos, macaddr->nv_addrlen);
   ninfo("            ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
-        ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), ntohs(ipaddr[3]),
-        ntohs(ipaddr[4]), ntohs(ipaddr[5]), ntohs(ipaddr[6]), ntohs(ipaddr[7]));
+        ntohs(ipaddr[0]), ntohs(ipaddr[1]),
+        ntohs(ipaddr[2]), ntohs(ipaddr[3]),
+        ntohs(ipaddr[4]), ntohs(ipaddr[5]),
+        ntohs(ipaddr[6]), ntohs(ipaddr[7]));
 
   switch (macaddr->nv_addrlen)
     {
@@ -529,8 +536,8 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
           srcptr += 2;
         }
 
-      /* If the IP is derived from a MAC address big enough to include the U/L bit,
-       * invert it.
+      /* If the IP is derived from a MAC address big enough to include the
+       * U/L bit, invert it.
        */
 
       if (usemac && postcount == 8)
@@ -552,10 +559,13 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
       nwarn("WARNING: No IID based configuration\n");
     }
 
-  ninfo("Uncompressing %d + %d ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
+  ninfo("Uncompressing %d + %d "
+        "ipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
         prefcount, postcount,
-        ntohs(ipaddr[0]), ntohs(ipaddr[1]), ntohs(ipaddr[2]), ntohs(ipaddr[3]),
-        ntohs(ipaddr[4]), ntohs(ipaddr[5]), ntohs(ipaddr[6]), ntohs(ipaddr[7]));
+        ntohs(ipaddr[0]), ntohs(ipaddr[1]),
+        ntohs(ipaddr[2]), ntohs(ipaddr[3]),
+        ntohs(ipaddr[4]), ntohs(ipaddr[5]),
+        ntohs(ipaddr[6]), ntohs(ipaddr[7]));
 }
 
 /****************************************************************************
@@ -566,12 +576,12 @@ static void uncompress_addr(FAR const struct netdev_varaddr_s *addr,
  * 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
@@ -595,14 +605,22 @@ void sixlowpan_hc06_initialize(void)
   g_hc06_addrcontexts[0].used      = 1;
   g_hc06_addrcontexts[0].number    = 0;
 
-  g_hc06_addrcontexts[0].prefix[0] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_0;
-  g_hc06_addrcontexts[0].prefix[1] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_1;
-  g_hc06_addrcontexts[0].prefix[2] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_2;
-  g_hc06_addrcontexts[0].prefix[3] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_3;
-  g_hc06_addrcontexts[0].prefix[4] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_4;
-  g_hc06_addrcontexts[0].prefix[5] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_5;
-  g_hc06_addrcontexts[0].prefix[6] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_6;
-  g_hc06_addrcontexts[0].prefix[7] = CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_7;
+  g_hc06_addrcontexts[0].prefix[0] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_0;
+  g_hc06_addrcontexts[0].prefix[1] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_1;
+  g_hc06_addrcontexts[0].prefix[2] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_2;
+  g_hc06_addrcontexts[0].prefix[3] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_3;
+  g_hc06_addrcontexts[0].prefix[4] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_4;
+  g_hc06_addrcontexts[0].prefix[5] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_5;
+  g_hc06_addrcontexts[0].prefix[6] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_6;
+  g_hc06_addrcontexts[0].prefix[7] =
+                         CONFIG_NET_6LOWPAN_MAXADDRCONTEXT_PREFIX_0_7;
 
 #if CONFIG_NET_6LOWPAN_MAXADDRCONTEXT > 1
   for (i = 1; i < CONFIG_NET_6LOWPAN_MAXADDRCONTEXT; i++)
@@ -883,7 +901,8 @@ int sixlowpan_compresshdr_hc06(FAR struct radio_driver_s *radio,
     {
       /* Elide the prefix - indicate by CID and set address context + SAC */
 
-      ninfo("Compressing src with address context. Setting SAC. Context: %d\n",
+      ninfo("Compressing src with address context."
+            " Setting SAC. Context: %d\n",
             saddrcontext->number);
 
       iphc1   |= SIXLOWPAN_IPHC_SAC;
@@ -910,7 +929,8 @@ int sixlowpan_compresshdr_hc06(FAR struct radio_driver_s *radio,
     {
       /* Send the full source address ipaddr:  SAC = 0, SAM = 00 */
 
-      ninfo("Uncompressable srcipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
+      ninfo("Uncompressable "
+            "srcipaddr=%04x:%04x:%04x:%04x:%04x:%04x:%04x:%04x\n",
             ntohs(ipv6->srcipaddr[0]), ntohs(ipv6->srcipaddr[1]),
             ntohs(ipv6->srcipaddr[2]), ntohs(ipv6->srcipaddr[3]),
             ntohs(ipv6->srcipaddr[4]), ntohs(ipv6->srcipaddr[5]),
@@ -985,7 +1005,8 @@ int sixlowpan_compresshdr_hc06(FAR struct radio_driver_s *radio,
         {
           /* Elide the prefix */
 
-          ninfo("Compressing dest with address context. Setting DAC. Context: %d\n",
+          ninfo("Compressing dest with address context. "
+                "Setting DAC. Context: %d\n",
                 daddrcontext->number);
 
           iphc1   |= SIXLOWPAN_IPHC_DAC;
@@ -1044,8 +1065,10 @@ int sixlowpan_compresshdr_hc06(FAR struct radio_driver_s *radio,
           ninfo("Remove 12b of both source & dest with prefix 0xf0b*\n");
 
           *(g_hc06ptr + 1) =
-            (uint8_t)((ntohs(udp->srcport) - SIXLOWPAN_UDP_4_BIT_PORT_MIN) << 4) +
-            (uint8_t)((ntohs(udp->destport) - SIXLOWPAN_UDP_4_BIT_PORT_MIN));
+            (uint8_t)((ntohs(udp->srcport) -
+             SIXLOWPAN_UDP_4_BIT_PORT_MIN) << 4) +
+            (uint8_t)((ntohs(udp->destport) -
+             SIXLOWPAN_UDP_4_BIT_PORT_MIN));
 
           g_hc06ptr += 2;
         }
@@ -1067,12 +1090,14 @@ int sixlowpan_compresshdr_hc06(FAR struct radio_driver_s *radio,
       else if ((ntohs(udp->srcport) & 0xff00) ==
                SIXLOWPAN_UDP_8_BIT_PORT_MIN)
         {
-          /* We can compress 8 bits of src, leave dest. Copy compressed port */
+          /* We can compress 8 bits of src, leave dest.
+           * Copy compressed port
+           */
 
           *g_hc06ptr = SIXLOWPAN_NHC_UDP_CS_P_10;
 
-          ninfo("Remove 8 bits of source with prefix 0xF0, leave dest. hch: %u\n",
-                *g_hc06ptr);
+          ninfo("Remove 8 bits of source with prefix 0xF0, "
+                "leave dest. hch: %u\n", *g_hc06ptr);
 
           *(g_hc06ptr + 1) =
             (uint8_t)((ntohs(udp->srcport) - SIXLOWPAN_UDP_8_BIT_PORT_MIN));
@@ -1228,7 +1253,8 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
           /* Traffic class is inline */
 
           ipv6->vtc   = 0x60 | ((*g_hc06ptr >> 2) & 0x0f);
-          ipv6->tcf   = ((*g_hc06ptr << 6) & 0xc0) | ((*g_hc06ptr >> 2) & 0x30);
+          ipv6->tcf   = ((*g_hc06ptr << 6) & 0xc0) |
+                        ((*g_hc06ptr >> 2) & 0x30);
           ipv6->flow  = 0;
           g_hc06ptr  += 1;
         }
@@ -1283,7 +1309,9 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
       FAR struct sixlowpan_addrcontext_s *addrcontext;
       uint8_t sci = (iphc1 & SIXLOWPAN_IPHC_CID) ? iphc[2] >> 4 : 0;
 
-      /* Source address - check address context != NULL only if SAM bits are != 0 */
+      /* Source address - check address context != NULL only if
+       * SAM bits are != 0
+       */
 
       if (tmp != 0)
         {
@@ -1295,7 +1323,8 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
             }
         }
 
-      /* If tmp == 0 we do not have a address context and therefore no prefix.
+      /* If tmp == 0 we do not have a address context and therefore no
+       * prefix.
        *
        * REVISIT: Source address may not be the same size as the destination
        * address.
@@ -1376,7 +1405,8 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
       if ((iphc1 & SIXLOWPAN_IPHC_DAC) != 0)
         {
           FAR struct sixlowpan_addrcontext_s *addrcontext;
-          uint8_t dci = ((iphc1 & SIXLOWPAN_IPHC_CID) != 0) ? iphc[2] & 0x0f : 0;
+          uint8_t dci = ((iphc1 & SIXLOWPAN_IPHC_CID) != 0) ?
+                          iphc[2] & 0x0f : 0;
 
           addrcontext = find_addrcontext_bynumber(dci);
 
@@ -1393,8 +1423,8 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
         }
       else
         {
-          /* Not address context based ipaddr=link local M = 0, DAC = 0 - same
-           * as SAC.
+          /* Not address context based ipaddr=link local M = 0,
+           * DAC = 0 - same as SAC.
            */
 
           uncompress_addr(&addr, g_llprefix, g_unc_llconf[tmp],
@@ -1408,7 +1438,8 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
 
   if ((iphc0 & SIXLOWPAN_IPHC_NH) != 0)
     {
-      FAR struct udp_hdr_s *udp = (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
+      FAR struct udp_hdr_s *udp =
+                            (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
 
       /* The next header is compressed, NHC is following */
 
@@ -1536,7 +1567,8 @@ void sixlowpan_uncompresshdr_hc06(FAR struct radio_driver_s *radio,
 
   if (ipv6->proto == IP_PROTO_UDP)
     {
-      FAR struct udp_hdr_s *udp = (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
+      FAR struct udp_hdr_s *udp =
+                          (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
       memcpy(&udp->udplen, &ipv6->len[0], 2);
     }
 }
diff --git a/net/sixlowpan/sixlowpan_hc1.c b/net/sixlowpan/sixlowpan_hc1.c
index 7496605..7605cb5 100644
--- a/net/sixlowpan/sixlowpan_hc1.c
+++ b/net/sixlowpan/sixlowpan_hc1.c
@@ -210,7 +210,8 @@ int sixlowpan_compresshdr_hc1(FAR struct radio_driver_s *radio,
              * 15
              */
 
-            ninfo("local/remote port %04x/%04x\n", udp->srcport, udp->destport);
+            ninfo("local/remote port %04x/%04x\n",
+                   udp->srcport, udp->destport);
 
             if (ntohs(udp->srcport)  >=  CONFIG_NET_6LOWPAN_MINPORT &&
                 ntohs(udp->srcport)  <  (CONFIG_NET_6LOWPAN_MINPORT + 16) &&
@@ -233,7 +234,8 @@ int sixlowpan_compresshdr_hc1(FAR struct radio_driver_s *radio,
                   (uint8_t)((ntohs(udp->destport) -
                             CONFIG_NET_6LOWPAN_MINPORT));
 
-                memcpy(&hcudp[SIXLOWPAN_HC1_HC_UDP_CHKSUM], &udp->udpchksum, 2);
+                memcpy(&hcudp[SIXLOWPAN_HC1_HC_UDP_CHKSUM],
+                       &udp->udpchksum, 2);
 
                 g_frame_hdrlen  += SIXLOWPAN_HC1_HC_UDP_HDR_LEN;
                 g_uncomp_hdrlen += UDP_HDRLEN;
@@ -341,7 +343,8 @@ int sixlowpan_uncompresshdr_hc1(FAR struct radio_driver_s *radio,
 #ifdef CONFIG_NET_UDP
     case SIXLOWPAN_HC1_NH_UDP:
       {
-        FAR struct udp_hdr_s *udp = (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
+        FAR struct udp_hdr_s *udp =
+                         (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
         FAR uint8_t *hcudp = fptr + g_frame_hdrlen;
 
         ipv6->proto = IP_PROTO_UDP;
@@ -355,7 +358,8 @@ int sixlowpan_uncompresshdr_hc1(FAR struct radio_driver_s *radio,
             if (hcudp[SIXLOWPAN_HC1_HC_UDP_UDP_ENCODING] !=
                 SIXLOWPAN_HC_UDP_ALL_C)
               {
-                nwarn("WARNING: sixlowpan (uncompress_hdr), packet not supported");
+                nwarn("WARNING: "
+                      "sixlowpan (uncompress_hdr), packet not supported");
                 return -EOPNOTSUPP;
               }
 
@@ -372,9 +376,11 @@ int sixlowpan_uncompresshdr_hc1(FAR struct radio_driver_s *radio,
               htons(CONFIG_NET_6LOWPAN_MINPORT +
                     (hcudp[SIXLOWPAN_HC1_HC_UDP_PORTS] & 0x0f));
 
-            ninfo("UDP srcport=%04x destport=%04x\n", udp->srcport, udp->destport);
+            ninfo("UDP srcport=%04x destport=%04x\n",
+                   udp->srcport, udp->destport);
 
-            memcpy(&udp->udpchksum, &hcudp[SIXLOWPAN_HC1_HC_UDP_CHKSUM], 2);
+            memcpy(&udp->udpchksum,
+                   &hcudp[SIXLOWPAN_HC1_HC_UDP_CHKSUM], 2);
 
             g_uncomp_hdrlen += UDP_HDRLEN;
             g_frame_hdrlen  += SIXLOWPAN_HC1_HC_UDP_HDR_LEN;
@@ -474,7 +480,8 @@ int sixlowpan_uncompresshdr_hc1(FAR struct radio_driver_s *radio,
 
   if (ipv6->proto == IP_PROTO_UDP)
     {
-      FAR struct udp_hdr_s *udp = (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
+      FAR struct udp_hdr_s *udp =
+                           (FAR struct udp_hdr_s *)(bptr + IPv6_HDRLEN);
       memcpy(&udp->udplen, &ipv6->len[0], 2);
 
       ninfo("IPv6 len=%04x\n", udp->udplen);
diff --git a/net/udp/udp_devpoll.c b/net/udp/udp_devpoll.c
index a60e9c5..92eaf04 100644
--- a/net/udp/udp_devpoll.c
+++ b/net/udp/udp_devpoll.c
@@ -82,9 +82,9 @@ void udp_poll(FAR struct net_driver_s *dev, FAR struct udp_conn_s *conn)
 
   if (conn->lport != 0)
     {
-      /* Set up for the callback.  We can't know in advance if the application
-       * is going to send a IPv4 or an IPv6 packet, so this setup may not
-       * actually be used.
+      /* Set up for the callback.  We can't know in advance if the
+       * application is going to send a IPv4 or an IPv6 packet, so this setup
+       * may not actually be used.
        */
 
 #if defined(CONFIG_NET_IPv4)
diff --git a/net/udp/udp_input.c b/net/udp/udp_input.c
index fdb439d..c1e5ced 100644
--- a/net/udp/udp_input.c
+++ b/net/udp/udp_input.c
@@ -117,7 +117,9 @@ static int udp_input(FAR struct net_driver_s *dev, unsigned int iplen)
 
   udpiplen = iplen + UDP_HDRLEN;
 
-  /* Get the size of the link layer header, the IP header, and the UDP header */
+  /* Get the size of the link layer header, the IP header, and the UDP
+   * header
+   */
 
   hdrlen = udpiplen + NET_LL_HDRLEN(dev);
 
diff --git a/net/usrsock/usrsock_connect.c b/net/usrsock/usrsock_connect.c
index 4197f41..9cacbf9 100644
--- a/net/usrsock/usrsock_connect.c
+++ b/net/usrsock/usrsock_connect.c
@@ -144,7 +144,8 @@ static int do_connect_request(FAR struct usrsock_conn_s *conn,
  *   Perform a usrsock connection
  *
  * Input Parameters:
- *   psock - A reference to the socket structure of the socket to be connected
+ *   psock - A reference to the socket structure of the socket to be
+ *           connected
  *   addr    The address of the remote server to connect to
  *   addrlen Length of address buffer
  *
diff --git a/net/usrsock/usrsock_poll.c b/net/usrsock/usrsock_poll.c
index 1e5e6cf..c6cda3a 100644
--- a/net/usrsock/usrsock_poll.c
+++ b/net/usrsock/usrsock_poll.c
@@ -154,7 +154,8 @@ static uint16_t poll_event(FAR struct net_driver_s *dev, FAR void *pvconn,
  *
  ****************************************************************************/
 
-static int usrsock_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
+static int usrsock_pollsetup(FAR struct socket *psock,
+                             FAR struct pollfd *fds)
 {
   FAR struct usrsock_conn_s *conn = psock->s_conn;
   FAR struct usrsock_poll_s *info;
@@ -230,8 +231,10 @@ static int usrsock_pollsetup(FAR struct socket *psock, FAR struct pollfd *fds)
 
   /* Stream sockets need to be connected or connecting (or listening). */
 
-  else if ((conn->type == SOCK_STREAM || conn->type == SOCK_SEQPACKET) &&
-           !(conn->connected || conn->state == USRSOCK_CONN_STATE_CONNECTING))
+  else if ((conn->type == SOCK_STREAM ||
+            conn->type == SOCK_SEQPACKET) &&
+          !(conn->connected || conn->state ==
+            USRSOCK_CONN_STATE_CONNECTING))
     {
       ninfo("stream socket not connected and not connecting.\n");
 
@@ -363,7 +366,8 @@ static int usrsock_pollteardown(FAR struct socket *psock,
  *
  ****************************************************************************/
 
-int usrsock_poll(FAR struct socket *psock, FAR struct pollfd *fds, bool setup)
+int usrsock_poll(FAR struct socket *psock,
+                 FAR struct pollfd *fds, bool setup)
 {
   if (setup)
     {