mirror of
https://github.com/postgres/postgres.git
synced 2025-05-31 00:01:57 -04:00
Change some keyring function to return void
No callers cared about the return value of these functions anyway.
This commit is contained in:
parent
14a2bd2849
commit
043232e31e
@ -62,9 +62,9 @@ static GenericKeyring *load_keyring_provider_from_record(KeyringProviderRecord *
|
||||
static inline void get_keyring_infofile_path(char *resPath, Oid dbOid);
|
||||
static bool fetch_next_key_provider(int fd, off_t *curr_pos, KeyringProviderRecord *provider);
|
||||
|
||||
static uint32 write_key_provider_info(KeyringProviderRecord *provider,
|
||||
Oid database_id, off_t position,
|
||||
bool error_if_exists, bool write_xlog);
|
||||
static void write_key_provider_info(KeyringProviderRecord *provider,
|
||||
Oid database_id, off_t position,
|
||||
bool error_if_exists, bool write_xlog);
|
||||
|
||||
#ifdef FRONTEND
|
||||
|
||||
@ -188,10 +188,10 @@ GetAllKeyringProviders(Oid dbOid)
|
||||
return scan_key_provider_file(PROVIDER_SCAN_ALL, NULL, dbOid);
|
||||
}
|
||||
|
||||
uint32
|
||||
void
|
||||
redo_key_provider_info(KeyringProviderXLRecord *xlrec)
|
||||
{
|
||||
return write_key_provider_info(&xlrec->provider, xlrec->database_id, xlrec->offset_in_file, false, false);
|
||||
write_key_provider_info(&xlrec->provider, xlrec->database_id, xlrec->offset_in_file, false, false);
|
||||
}
|
||||
|
||||
static void
|
||||
@ -394,7 +394,7 @@ GetKeyProviderByID(int provider_id, Oid dbOid)
|
||||
|
||||
#endif /* !FRONTEND */
|
||||
|
||||
static uint32
|
||||
static void
|
||||
write_key_provider_info(KeyringProviderRecord *provider, Oid database_id,
|
||||
off_t position, bool error_if_exists, bool write_xlog)
|
||||
{
|
||||
@ -548,26 +548,25 @@ write_key_provider_info(KeyringProviderRecord *provider, Oid database_id,
|
||||
}
|
||||
close(fd);
|
||||
LWLockRelease(tde_provider_info_lock());
|
||||
return provider->provider_id;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Save the key provider info to the file
|
||||
*/
|
||||
uint32
|
||||
void
|
||||
save_new_key_provider_info(KeyringProviderRecord *provider, Oid databaseId, bool write_xlog)
|
||||
{
|
||||
return write_key_provider_info(provider, databaseId, -1, true, write_xlog);
|
||||
write_key_provider_info(provider, databaseId, -1, true, write_xlog);
|
||||
}
|
||||
|
||||
uint32
|
||||
void
|
||||
modify_key_provider_info(KeyringProviderRecord *provider, Oid databaseId, bool write_xlog)
|
||||
{
|
||||
return write_key_provider_info(provider, databaseId, -1, false, write_xlog);
|
||||
write_key_provider_info(provider, databaseId, -1, false, write_xlog);
|
||||
}
|
||||
|
||||
uint32
|
||||
void
|
||||
delete_key_provider_info(int provider_id, Oid databaseId, bool write_xlog)
|
||||
{
|
||||
KeyringProviderRecord kpr;
|
||||
@ -575,7 +574,7 @@ delete_key_provider_info(int provider_id, Oid databaseId, bool write_xlog)
|
||||
memset(&kpr, 0, sizeof(KeyringProviderRecord));
|
||||
kpr.provider_id = provider_id;
|
||||
|
||||
return modify_key_provider_info(&kpr, databaseId, write_xlog);
|
||||
modify_key_provider_info(&kpr, databaseId, write_xlog);
|
||||
}
|
||||
|
||||
#ifdef FRONTEND
|
||||
|
@ -33,13 +33,13 @@ extern GenericKeyring *GetKeyProviderByName(const char *provider_name, Oid dbOid
|
||||
extern GenericKeyring *GetKeyProviderByID(int provider_id, Oid dbOid);
|
||||
extern ProviderType get_keyring_provider_from_typename(char *provider_type);
|
||||
extern void InitializeKeyProviderInfo(void);
|
||||
extern uint32 save_new_key_provider_info(KeyringProviderRecord *provider,
|
||||
Oid databaseId, bool write_xlog);
|
||||
extern uint32 modify_key_provider_info(KeyringProviderRecord *provider,
|
||||
extern void save_new_key_provider_info(KeyringProviderRecord *provider,
|
||||
Oid databaseId, bool write_xlog);
|
||||
extern uint32 delete_key_provider_info(int provider_id,
|
||||
Oid databaseId, bool write_xlog);
|
||||
extern uint32 redo_key_provider_info(KeyringProviderXLRecord *xlrec);
|
||||
extern void modify_key_provider_info(KeyringProviderRecord *provider,
|
||||
Oid databaseId, bool write_xlog);
|
||||
extern void delete_key_provider_info(int provider_id,
|
||||
Oid databaseId, bool write_xlog);
|
||||
extern void redo_key_provider_info(KeyringProviderXLRecord *xlrec);
|
||||
|
||||
extern bool ParseKeyringJSONOptions(ProviderType provider_type, void *out_opts,
|
||||
char *in_buf, int buf_len);
|
||||
|
Loading…
x
Reference in New Issue
Block a user