1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-24 00:23:06 +03:00

Remove AssertArg and AssertState

These don't offer anything over plain Assert, and their usage had
already been declared obsolescent.

Author: Nathan Bossart <nathandbossart@gmail.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/20221009210148.GA900071@nathanxps13
This commit is contained in:
Peter Eisentraut
2022-10-28 09:19:06 +02:00
parent d37aa3d358
commit b1099eca8f
44 changed files with 162 additions and 174 deletions

View File

@@ -405,7 +405,7 @@ file_exists(const char *name)
{
struct stat st;
AssertArg(name != NULL);
Assert(name != NULL);
if (stat(name, &st) == 0)
return !S_ISDIR(st.st_mode);
@@ -434,7 +434,7 @@ expand_dynamic_library_name(const char *name)
char *new;
char *full;
AssertArg(name);
Assert(name);
have_slash = (first_dir_separator(name) != NULL);
@@ -502,7 +502,7 @@ substitute_libpath_macro(const char *name)
{
const char *sep_ptr;
AssertArg(name != NULL);
Assert(name != NULL);
/* Currently, we only recognize $libdir at the start of the string */
if (name[0] != '$')
@@ -534,9 +534,9 @@ find_in_dynamic_libpath(const char *basename)
const char *p;
size_t baselen;
AssertArg(basename != NULL);
AssertArg(first_dir_separator(basename) == NULL);
AssertState(Dynamic_library_path != NULL);
Assert(basename != NULL);
Assert(first_dir_separator(basename) == NULL);
Assert(Dynamic_library_path != NULL);
p = Dynamic_library_path;
if (strlen(p) == 0)