netutils: nxstyle fixes

fixes for errors reported by nxstyle tool

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
This commit is contained in:
Alin Jerpelea
2021-06-11 12:06:42 +02:00
committed by Xiang Xiao
parent adc3c9fae9
commit 5572819bb1
52 changed files with 228 additions and 173 deletions

View File

@@ -1,5 +1,5 @@
/****************************************************************************
* netutils/netlib/netlib_ipv4route.c
* apps/netutils/netlib/netlib_ipv4route.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@@ -71,14 +71,16 @@
static void set_nul_terminator(FAR char *str)
{
/* The first non-decimal character that is not '.' terminates the address */
/* The first non-decimal character that is not '.' terminates the
* address
*/
while ((*str >= '0' && *str <= '9') || *str == '.')
{
str++;
}
while ((*str >= '0' && *str <= '9') || *str == '.')
{
str++;
}
*str = '\0';
*str = '\0';
}
/****************************************************************************
@@ -173,7 +175,7 @@ ssize_t netlib_read_ipv4route(FILE *stream,
{
return sizeof(struct netlib_ipv4_route_s);
}
}
}
}
return ret < 0 ? ret : -EINVAL;