[PATCH 2/2] newlib: Rename __sfmoreglue() and make it static
Sebastian Huber
sebastian.huber@embedded-brains.de
Wed Mar 30 09:57:45 GMT 2022
Rename __sfmoreglue() in sfmoreglue() and make it static. This function is
only used by __sfp() in the same translation unit.
Remove use of register keyword.
---
newlib/libc/stdio/findfp.c | 7 +++----
newlib/libc/stdio/local.h | 1 -
2 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/newlib/libc/stdio/findfp.c b/newlib/libc/stdio/findfp.c
index 7bb48e014..eca47bd92 100644
--- a/newlib/libc/stdio/findfp.c
+++ b/newlib/libc/stdio/findfp.c
@@ -122,9 +122,8 @@ struct glue_with_file {
FILE file;
};
-struct _glue *
-__sfmoreglue (struct _reent *d,
- register int n)
+static struct _glue *
+sfmoreglue (struct _reent *d, int n)
{
struct glue_with_file *g;
@@ -160,7 +159,7 @@ __sfp (struct _reent *d)
if (fp->_flags == 0)
goto found;
if (g->_next == NULL &&
- (g->_next = __sfmoreglue (d, NDYNAMIC)) == NULL)
+ (g->_next = sfmoreglue (d, NDYNAMIC)) == NULL)
break;
}
_newlib_sfp_lock_exit ();
diff --git a/newlib/libc/stdio/local.h b/newlib/libc/stdio/local.h
index 09ccd6407..86422eb11 100644
--- a/newlib/libc/stdio/local.h
+++ b/newlib/libc/stdio/local.h
@@ -184,7 +184,6 @@ extern void _cleanup_r (struct _reent *);
extern void __smakebuf_r (struct _reent *, FILE *);
extern int __swhatbuf_r (struct _reent *, FILE *, size_t *, int *);
extern int _fwalk_reent (struct _reent *, int (*)(struct _reent *, FILE *));
-struct _glue * __sfmoreglue (struct _reent *,int n);
extern int __submore (struct _reent *, FILE *);
#ifdef __LARGE64_FILES
--
2.34.1
More information about the Newlib
mailing list