Skip to content

Commit

Permalink
Make global configs as static (#1159)
Browse files Browse the repository at this point in the history
Don't expose static configs symbol, and make configEnumGetValue as
static function.

Signed-off-by: zhenwei pi <[email protected]>
  • Loading branch information
pizhenwei authored Dec 30, 2024
1 parent e4179f1 commit a136ad9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ struct standardConfig {
void *privdata; /* privdata for this config, for module configs this is a ModuleConfig struct */
};

dict *configs = NULL; /* Runtime config values */
static dict *configs = NULL; /* Runtime config values */

/* Lookup a config by the provided sds string name, or return NULL
* if the config does not exist */
Expand All @@ -297,7 +297,7 @@ static standardConfig *lookupConfig(sds name) {
*----------------------------------------------------------------------------*/

/* Get enum value from name. If there is no match INT_MIN is returned. */
int configEnumGetValue(configEnum *ce, sds *argv, int argc, int bitflags) {
static int configEnumGetValue(configEnum *ce, sds *argv, int argc, int bitflags) {
if (argc == 0 || (!bitflags && argc != 1)) return INT_MIN;
int values = 0;
for (int i = 0; i < argc; i++) {
Expand Down

0 comments on commit a136ad9

Please sign in to comment.