mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
stdlib: Fix forgotten FARs
This commit is contained in:
@@ -49,11 +49,11 @@
|
||||
* Public Functions
|
||||
****************************************************************************/
|
||||
|
||||
char *itoa(int val, char *str, int base)
|
||||
FAR char *itoa(int val, FAR char *str, int base)
|
||||
{
|
||||
static const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
static FAR const char *digits = "0123456789abcdefghijklmnopqrstuvwxyz";
|
||||
int intval = abs(val), digit, pos, len;
|
||||
char *buf = str;
|
||||
FAR char *buf = str;
|
||||
char swap;
|
||||
|
||||
if (base >= 2 && base <= 36)
|
||||
|
||||
@@ -87,7 +87,7 @@ static inline int is_real(double x)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
double_t strtod(const char *str, char **endptr)
|
||||
double_t strtod(FAR const char *str, FAR char **endptr)
|
||||
{
|
||||
double_t number;
|
||||
int exponent;
|
||||
@@ -238,4 +238,3 @@ double_t strtod(const char *str, char **endptr)
|
||||
}
|
||||
|
||||
#endif /* CONFIG_HAVE_DOUBLE */
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
long strtol(const char *nptr, char **endptr, int base)
|
||||
long strtol(FAR const char *nptr, FAR char **endptr, int base)
|
||||
{
|
||||
unsigned long accum = 0;
|
||||
bool negate = false;
|
||||
@@ -101,4 +101,3 @@ long strtol(const char *nptr, char **endptr, int base)
|
||||
|
||||
return (long)accum;
|
||||
}
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
long long strtoll(const char *nptr, char **endptr, int base)
|
||||
long long strtoll(FAR const char *nptr, FAR char **endptr, int base)
|
||||
{
|
||||
unsigned long long accum = 0;
|
||||
bool negate = false;
|
||||
@@ -105,4 +105,3 @@ long long strtoll(const char *nptr, char **endptr, int base)
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -63,7 +63,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned long strtoul(const char *nptr, char **endptr, int base)
|
||||
unsigned long strtoul(FAR const char *nptr, FAR char **endptr, int base)
|
||||
{
|
||||
unsigned long accum = 0;
|
||||
int value;
|
||||
@@ -96,4 +96,3 @@ unsigned long strtoul(const char *nptr, char **endptr, int base)
|
||||
|
||||
return accum;
|
||||
}
|
||||
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
unsigned long long strtoull(const char *nptr, char **endptr, int base)
|
||||
unsigned long long strtoull(FAR const char *nptr, FAR char **endptr, int base)
|
||||
{
|
||||
unsigned long long accum = 0;
|
||||
int value;
|
||||
@@ -96,5 +96,5 @@ unsigned long long strtoull(const char *nptr, char **endptr, int base)
|
||||
}
|
||||
return accum;
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user