Remove unnecessary static specifier
От | Japin Li |
---|---|
Тема | Remove unnecessary static specifier |
Дата | |
Msg-id | ME0P300MB0445096B67ACE8CE25772F00B6F72@ME0P300MB0445.AUSP300.PROD.OUTLOOK.COM обсуждение исходный текст |
Ответы |
Re: Remove unnecessary static specifier
|
Список | pgsql-hackers |
Hi, When reviewing patch [1], I find that the static class specifier is unnecessary for the variables sp and ep in the function px_crypt_md5(). diff --git a/contrib/pgcrypto/crypt-md5.c b/contrib/pgcrypto/crypt-md5.c index d38721a1010..3d17b2340fe 100644 --- a/contrib/pgcrypto/crypt-md5.c +++ b/contrib/pgcrypto/crypt-md5.c @@ -36,8 +36,8 @@ px_crypt_md5(const char *pw, const char *salt, char *passwd, unsigned dstlen) static char *magic = "$1$"; /* This string is magic for this algorithm. * Having it this way, we can get better later * on */ - static char *p; - static const char *sp, + char *p; + const char *sp, *ep; unsigned char final[MD5_SIZE]; int sl, I also find that FreeBSD removed this specifier in [2]. Should we remove this? [1] https://www.postgresql.org/message-id/c763235a2757e2f5f9e3e27268b9028349cef659.camel%40oopsware.de [2] https://reviews.freebsd.org/D7306 -- Regrads, Japin Li
В списке pgsql-hackers по дате отправления: