git: 69ae5b96672a - main - remove register
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 31 Jan 2022 10:59:35 UTC
The branch main has been updated by wosch:
URL: https://cgit.FreeBSD.org/src/commit/?id=69ae5b96672ad3e299043fac60644093552a49bf
commit 69ae5b96672ad3e299043fac60644093552a49bf
Author: Wolfram Schneider <wosch@FreeBSD.org>
AuthorDate: 2022-01-31 10:59:07 +0000
Commit: Wolfram Schneider <wosch@FreeBSD.org>
CommitDate: 2022-01-31 10:59:07 +0000
remove register
There are no measurable performance differences if registers are used or not.
---
usr.bin/locate/locate/fastfind.c | 8 ++++----
usr.bin/locate/locate/locate.c | 2 +-
usr.bin/locate/locate/util.c | 8 ++++----
3 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/usr.bin/locate/locate/fastfind.c b/usr.bin/locate/locate/fastfind.c
index 69a3c2ed8152..1fe611186e68 100644
--- a/usr.bin/locate/locate/fastfind.c
+++ b/usr.bin/locate/locate/fastfind.c
@@ -45,8 +45,8 @@ statistic (fp, path_fcodes)
char *path_fcodes; /* for error message */
{
long lines, chars, size, big, zwerg, umlaut;
- register u_char *p, *s;
- register int c;
+ u_char *p, *s;
+ int c;
int count, longest_path;
int error = 0;
u_char bigram1[NBG], bigram2[NBG], path[MAXPATHLEN];
@@ -151,8 +151,8 @@ fastfind
#endif /* MMAP */
{
- register u_char *p, *s, *patend, *q, *foundchar;
- register int c, cc;
+ u_char *p, *s, *patend, *q, *foundchar;
+ int c, cc;
int count, found, globflag;
u_char *cutoff;
u_char bigram1[NBG], bigram2[NBG], path[MAXPATHLEN + 2];
diff --git a/usr.bin/locate/locate/locate.c b/usr.bin/locate/locate/locate.c
index 40e183f8d45a..0bbd95ac696d 100644
--- a/usr.bin/locate/locate/locate.c
+++ b/usr.bin/locate/locate/locate.c
@@ -128,7 +128,7 @@ extern char *patprep(char *);
int
main(int argc, char **argv)
{
- register int ch;
+ int ch;
char **dbv = NULL;
char *path_fcodes; /* locate database */
#ifdef MMAP
diff --git a/usr.bin/locate/locate/util.c b/usr.bin/locate/locate/util.c
index 77d8f7e58079..8482ec998f03 100644
--- a/usr.bin/locate/locate/util.c
+++ b/usr.bin/locate/locate/util.c
@@ -140,7 +140,7 @@ char *
patprep(name)
char *name;
{
- register char *endmark, *p, *subp;
+ char *endmark, *p, *subp;
subp = globfree;
*subp++ = '\0'; /* set first element to '\0' */
@@ -194,7 +194,7 @@ u_char *
tolower_word(word)
u_char *word;
{
- register u_char *p;
+ u_char *p;
for(p = word; *p != '\0'; p++)
*p = TOLOWER(*p);
@@ -221,7 +221,7 @@ getwm(p)
char buf[INTSIZE];
int i;
} u;
- register int i, hi;
+ int i, hi;
/* the integer is stored by an offset of 14 (!!!) */
int i_max = MAXPATHLEN + OFFSET;
@@ -254,7 +254,7 @@ int
getwf(fp)
FILE *fp;
{
- register int word, hword;
+ int word, hword;
int i_max = MAXPATHLEN + OFFSET;
int i_min = -(MAXPATHLEN - OFFSET);