summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlejandro Colomar <alx@kernel.org>2024-04-18 14:41:18 +0200
committerAlejandro Colomar <alx@kernel.org>2024-04-18 14:41:42 +0200
commitad5fec747f90a19957f5549a45d80fda4d3cf493 (patch)
treea90a4d1246e8d7d757904014b3d618ae975eb085
parentbb04fc7810829264bf866a9271a6d9ae3266997f (diff)
include/a2i/str2i.h, lib/src/a2i/str2i.c: Remove redundant 'restrict'
It allows having shorter lines. It also makes the prototypes of str2*() functions more similar to a2*() ones. Signed-off-by: Alejandro Colomar <alx@kernel.org>
-rw-r--r--include/a2i/str2i.h22
-rw-r--r--lib/src/a2i/str2i.c20
2 files changed, 21 insertions, 21 deletions
diff --git a/include/a2i/str2i.h b/include/a2i/str2i.h
index 4118d9e..4a7bc98 100644
--- a/include/a2i/str2i.h
+++ b/include/a2i/str2i.h
@@ -59,17 +59,17 @@
#if defined(__clang__)
# pragma clang assume_nonnull begin
#endif
-A2I_STR2I_ATTR int str2shh(signed char *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2sh(short *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2si(int *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2sl(long *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2sll(long long *restrict n, const char *restrict s);
-
-A2I_STR2I_ATTR int str2uhh(unsigned char *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2uh(unsigned short *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2ui(unsigned int *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2ul(unsigned long *restrict n, const char *restrict s);
-A2I_STR2I_ATTR int str2ull(unsigned long long *restrict n, const char *restrict s);
+A2I_STR2I_ATTR int str2shh(signed char *restrict n, const char *s);
+A2I_STR2I_ATTR int str2sh(short *restrict n, const char *s);
+A2I_STR2I_ATTR int str2si(int *restrict n, const char *s);
+A2I_STR2I_ATTR int str2sl(long *restrict n, const char *s);
+A2I_STR2I_ATTR int str2sll(long long *restrict n, const char *s);
+
+A2I_STR2I_ATTR int str2uhh(unsigned char *restrict n, const char *s);
+A2I_STR2I_ATTR int str2uh(unsigned short *restrict n, const char *s);
+A2I_STR2I_ATTR int str2ui(unsigned int *restrict n, const char *s);
+A2I_STR2I_ATTR int str2ul(unsigned long *restrict n, const char *s);
+A2I_STR2I_ATTR int str2ull(unsigned long long *restrict n, const char *s);
#if defined(__clang__)
# pragma clang assume_nonnull end
#endif
diff --git a/lib/src/a2i/str2i.c b/lib/src/a2i/str2i.c
index 218abce..aed70d0 100644
--- a/lib/src/a2i/str2i.c
+++ b/lib/src/a2i/str2i.c
@@ -14,62 +14,62 @@
# pragma clang assume_nonnull begin
#endif
int
-str2shh(signed char *restrict n, const char *restrict s)
+str2shh(signed char *restrict n, const char *s)
{
return a2i(signed char, n, s, NULL, 0, SCHAR_MIN, SCHAR_MAX);
}
int
-str2sh(short *restrict n, const char *restrict s)
+str2sh(short *restrict n, const char *s)
{
return a2i(short, n, s, NULL, 0, SHRT_MIN, SHRT_MAX);
}
int
-str2si(int *restrict n, const char *restrict s)
+str2si(int *restrict n, const char *s)
{
return a2i(int, n, s, NULL, 0, INT_MIN, INT_MAX);
}
int
-str2sl(long *restrict n, const char *restrict s)
+str2sl(long *restrict n, const char *s)
{
return a2i(long, n, s, NULL, 0, LONG_MIN, LONG_MAX);
}
int
-str2sll(long long *restrict n, const char *restrict s)
+str2sll(long long *restrict n, const char *s)
{
return a2i(long long, n, s, NULL, 0, LLONG_MIN, LLONG_MAX);
}
int
-str2uhh(unsigned char *restrict n, const char *restrict s)
+str2uhh(unsigned char *restrict n, const char *s)
{
return a2i(unsigned char, n, s, NULL, 0, 0, UCHAR_MAX);
}
int
-str2uh(unsigned short *restrict n, const char *restrict s)
+str2uh(unsigned short *restrict n, const char *s)
{
return a2i(unsigned short, n, s, NULL, 0, 0, USHRT_MAX);
}
int
-str2ui(unsigned int *restrict n, const char *restrict s)
+str2ui(unsigned int *restrict n, const char *s)
{
return a2i(unsigned int, n, s, NULL, 0, 0, UINT_MAX);
}
int
-str2ul(unsigned long *restrict n, const char *restrict s)
+str2ul(unsigned long *restrict n, const char *s)
{
return a2i(unsigned long, n, s, NULL, 0, 0, ULONG_MAX);
}
int
-str2ull(unsigned long long *restrict n, const char *restrict s)
+str2ull(unsigned long long *restrict n, const char *s)
{
return a2i(unsigned long long, n, s, NULL, 0, 0, ULLONG_MAX);
}