Use strcmp() instead of strncmp()

Since we know that both strings are zero termianted there is no reason
to use strncmp().
pull/238/head
Andreas Karlsson 3 months ago committed by Andreas Karlsson
parent 1749d8ccd8
commit b93a6fe27b
  1. 2
      contrib/pg_tde/src/catalog/tde_principal_key.c

@ -1009,7 +1009,7 @@ pg_tde_verify_provider_keys_in_use(GenericKeyring *modified_provider)
static bool
pg_tde_is_same_principal_key(TDEPrincipalKey *a, TDEPrincipalKey *b)
{
return a != NULL && b != NULL && strncmp(a->keyInfo.name, b->keyInfo.name, PRINCIPAL_KEY_NAME_LEN) == 0 && a->keyInfo.keyringId == b->keyInfo.keyringId;
return a != NULL && b != NULL && strcmp(a->keyInfo.name, b->keyInfo.name) == 0 && a->keyInfo.keyringId == b->keyInfo.keyringId;
}
static void

Loading…
Cancel
Save