From 6e403fc343ef7bae91c06db8eebfc4df5c73663a Mon Sep 17 00:00:00 2001 From: "Alan C. Assis" Date: Thu, 16 Apr 2020 23:02:46 -0300 Subject: [PATCH] Fix remaining issues with nxstyle --- include/netutils/md5.h | 22 +++++++++++----------- netutils/codecs/md5.c | 22 +++++++++++----------- nshlib/nsh_codeccmd.c | 18 ++++++++++++------ 3 files changed, 34 insertions(+), 28 deletions(-) diff --git a/include/netutils/md5.h b/include/netutils/md5.h index 9e138c350..ff10c4e2d 100644 --- a/include/netutils/md5.h +++ b/include/netutils/md5.h @@ -41,17 +41,17 @@ * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE 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. * ****************************************************************************/ diff --git a/netutils/codecs/md5.c b/netutils/codecs/md5.c index 132b8bd10..694e50f60 100644 --- a/netutils/codecs/md5.c +++ b/netutils/codecs/md5.c @@ -40,17 +40,17 @@ * may be used to endorse or promote products derived from this software * without specific prior written permission. * - * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE 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. * ****************************************************************************/ diff --git a/nshlib/nsh_codeccmd.c b/nshlib/nsh_codeccmd.c index fe6ea6f0e..4b70a9054 100644 --- a/nshlib/nsh_codeccmd.c +++ b/nshlib/nsh_codeccmd.c @@ -249,8 +249,9 @@ static int calc_codec_buffsize(int srclen, uint8_t mode) ****************************************************************************/ #ifdef NEED_CMD_CODECS_PROC -static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, - uint8_t mode, codec_callback_t func) +static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, + char **argv, uint8_t mode, + codec_callback_t func) { #ifdef HAVE_CODECS_HASH_MD5 static const unsigned char hexchars[] = "0123456789abcdef"; @@ -289,7 +290,8 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, case 'w': iswebsafe = true; - if (!(mode == CODEC_MODE_BASE64ENC || mode == CODEC_MODE_BASE64DEC)) + if (!(mode == CODEC_MODE_BASE64ENC || + mode == CODEC_MODE_BASE64DEC)) { badarg = true; } @@ -308,7 +310,9 @@ static int cmd_codecs_proc(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv, } } - /* If a bad argument was encountered, then return without processing the command */ + /* If a bad argument was encountered, then return without processing + * the command + */ if (badarg) { @@ -540,7 +544,8 @@ errout: #ifdef HAVE_CODECS_URLENCODE int cmd_urlencode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { - return cmd_codecs_proc(vtbl, argc, argv, CODEC_MODE_URLENCODE, urlencode_cb); + return cmd_codecs_proc(vtbl, argc, argv, CODEC_MODE_URLENCODE, + urlencode_cb); } #endif @@ -551,7 +556,8 @@ int cmd_urlencode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) #ifdef HAVE_CODECS_URLDECODE int cmd_urldecode(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { - return cmd_codecs_proc(vtbl, argc, argv, CODEC_MODE_URLDECODE, urldecode_cb); + return cmd_codecs_proc(vtbl, argc, argv, CODEC_MODE_URLDECODE, + urldecode_cb); } #endif