Commit 2c1a3f6c authored by Alessandro Rubini's avatar Alessandro Rubini

general: kill pp_strnlen

Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
parent 8cbe8692
...@@ -9,7 +9,7 @@ const Integer32 PP_ADJ_FREQ_MAX = 512000; ...@@ -9,7 +9,7 @@ const Integer32 PP_ADJ_FREQ_MAX = 512000;
void pp_puts(const char *s) void pp_puts(const char *s)
{ {
sys_write(0, s, pp_strnlen(s, 300)); sys_write(0, s, strnlen(s, 300));
} }
void bare_get_tstamp(TimeInternal *t) void bare_get_tstamp(TimeInternal *t)
......
...@@ -9,7 +9,7 @@ const Integer32 PP_ADJ_FREQ_MAX = 512000; ...@@ -9,7 +9,7 @@ const Integer32 PP_ADJ_FREQ_MAX = 512000;
void pp_puts(const char *s) void pp_puts(const char *s)
{ {
sys_write(0, s, pp_strnlen(s, 300)); sys_write(0, s, strnlen(s, 300));
} }
void bare_get_tstamp(TimeInternal *t) void bare_get_tstamp(TimeInternal *t)
......
...@@ -25,11 +25,6 @@ void posix_puts(const char *s) ...@@ -25,11 +25,6 @@ void posix_puts(const char *s)
fputs(s, stdout); fputs(s, stdout);
} }
int posix_strnlen(const char *s, int maxlen)
{
return strnlen(s, maxlen);
}
void *posix_memcpy(void *d, const void *s, int count) void *posix_memcpy(void *d, const void *s, int count)
{ {
return memcpy(d, s, count); return memcpy(d, s, count);
...@@ -89,9 +84,6 @@ int posix_adj_freq(Integer32 adj) ...@@ -89,9 +84,6 @@ int posix_adj_freq(Integer32 adj)
void pp_puts(const char *s) void pp_puts(const char *s)
__attribute__((alias("posix_puts"))); __attribute__((alias("posix_puts")));
int pp_strnlen(const char *s, int maxlen)
__attribute__((alias("posix_strnlen")));
void *pp_memcpy(void *d, const void *s, int count) void *pp_memcpy(void *d, const void *s, int count)
__attribute__((alias("posix_memcpy"))); __attribute__((alias("posix_memcpy")));
......
...@@ -281,7 +281,7 @@ static char *string(char *buf, char *s, int field_width, int precision, int flag ...@@ -281,7 +281,7 @@ static char *string(char *buf, char *s, int field_width, int precision, int flag
if (s == 0) if (s == 0)
s = "<NULL>"; s = "<NULL>";
len = pp_strnlen(s, precision); len = strnlen(s, precision);
if (!(flags & LEFT)) if (!(flags & LEFT))
while (len < field_width--) while (len < field_width--)
......
...@@ -8,7 +8,6 @@ ...@@ -8,7 +8,6 @@
/* What follow is the old way, being phased out */ /* What follow is the old way, being phased out */
extern void pp_puts(const char *s); extern void pp_puts(const char *s);
extern int pp_strnlen(const char *s, int maxlen);
extern char *pp_strcpy(char *dest, const char *src); extern char *pp_strcpy(char *dest, const char *src);
extern void *pp_memcpy(void *d, const void *s, int count); extern void *pp_memcpy(void *d, const void *s, int count);
extern int pp_memcmp(const void *s1, const void *s2, int count); extern int pp_memcmp(const void *s1, const void *s2, int count);
......
...@@ -57,8 +57,6 @@ char *strcpy(char *dest, const char *src) ...@@ -57,8 +57,6 @@ char *strcpy(char *dest, const char *src)
} }
/* As a first step in removing pp_memset etc, provide aliases */ /* As a first step in removing pp_memset etc, provide aliases */
int pp_strnlen(const char *s, int maxlen)
__attribute__((alias("strnlen")));
extern char *pp_strcpy(char *dest, const char *src) extern char *pp_strcpy(char *dest, const char *src)
__attribute__((alias("strcpy"))); __attribute__((alias("strcpy")));
extern void *pp_memcpy(void *d, const void *s, int count) extern void *pp_memcpy(void *d, const void *s, int count)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment