]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
Drop register keyword
authorChristian Göttsche <cgzones@googlemail.com>
Fri, 5 Aug 2022 15:40:29 +0000 (17:40 +0200)
committerSerge Hallyn <serge@hallyn.com>
Sat, 6 Aug 2022 16:27:56 +0000 (11:27 -0500)
Compilers are free to ignore the indented hint and modern optimizations
should create good code by themself.

(As such it is for example deprecated in C++17.)

lib/sgetpwent.c
libmisc/motd.c

index 84a653d772d00b5dc0d52eae25ab926b9feda931..c6e5944c6d5a3f1972d4fcd541765eba4658c3c1 100644 (file)
@@ -35,8 +35,8 @@ struct passwd *sgetpwent (const char *buf)
 {
        static struct passwd pwent;
        static char pwdbuf[1024];
-       register int i;
-       register char *cp;
+       int i;
+       char *cp;
        char *fields[NFIELDS];
 
        /*
index 23e27f2417ce5e69c8738f0cbd2f059f2378f63f..7f7e523e609d340dce07983821e905e5089549a0 100644 (file)
@@ -28,7 +28,7 @@ void motd (void)
        char *motdlist;
        const char *motdfile;
        char *mb;
-       register int c;
+       int c;
 
        motdfile = getdef_str ("MOTD_FILE");
        if (NULL == motdfile) {