Skip to content

Commit a54fc89

Browse files
Replace GUC_UNIT_MEMORY|GUC_UNIT_TIME with GUC_UNIT.
We used (GUC_UNIT_MEMORY | GUC_UNIT_TIME) instead of GUC_UNIT some places but we already define it in guc.h. This commit replaces them with GUC_UNIT for better consistency with their surrounding code. Author: Japin Li Reviewed-by: Richard Guo, Michael Paquier, Masahiko Sawada Discussion: https://postgr.es/m/MEYP282MB1669EC0FED922F7A151673ACB65AA@MEYP282MB1669.AUSP282.PROD.OUTLOOK.COM
1 parent c00fbe8 commit a54fc89

File tree

1 file changed

+2
-2
lines changed
  • src/backend/utils/misc

1 file changed

+2
-2
lines changed

src/backend/utils/misc/guc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2766,7 +2766,7 @@ convert_real_from_base_unit(double base_value, int base_unit,
27662766
const char *
27672767
get_config_unit_name(int flags)
27682768
{
2769-
switch (flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME))
2769+
switch (flags & GUC_UNIT)
27702770
{
27712771
case 0:
27722772
return NULL; /* GUC has no units */
@@ -2802,7 +2802,7 @@ get_config_unit_name(int flags)
28022802
return "min";
28032803
default:
28042804
elog(ERROR, "unrecognized GUC units value: %d",
2805-
flags & (GUC_UNIT_MEMORY | GUC_UNIT_TIME));
2805+
flags & GUC_UNIT);
28062806
return NULL;
28072807
}
28082808
}

0 commit comments

Comments
 (0)