Re: Remove unnecessary static specifier
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Daniel Gustafsson <daniel@yesql.se>
Cc: Japin Li <japinli@hotmail.com>,
PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2025-02-05T16:05:15Z
Lists: pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes: > From a quick first inspection (and running the tests with the patch applied) I > agree with this, these variables do not need to be static. I'll stare a bit > more at this to make sure but seems like the right patch. +1. All three of those variables are visibly assigned to before any other reference, so they cannot carry data across calls of the function. While we're at it, could we make the adjacent "magic" string be "static const char *magic"? (Probably needs a couple more "const" modifiers at use sites, too.) regards, tom lane
Commits
-
pgcrypto: Remove static storage class from variables
- affd38e55a3c 18.0 landed