diff options
author | Daniel Gustafsson | 2022-09-14 19:58:30 +0000 |
---|---|---|
committer | Daniel Gustafsson | 2022-09-14 19:58:30 +0000 |
commit | 1d3566f1b2a8cf518ec26322023d243b288a90aa (patch) | |
tree | ecf34b74a0f8012d86c4a80a20d00c272ff4dd0d | |
parent | 5f84647ee1b25532cf5ea06801a4f36706a0cb96 (diff) |
pgcrypto: Remove unused code
The mbuf_tell, mbuf_rewind and pgp_get_cipher_name functions were
introduced in commit e94dd6ab91, but were never used, so remove.
Reviewed-by: Aleksander Alekseev <[email protected]>
Discussion: https://postgr.es/m/[email protected]
-rw-r--r-- | contrib/pgcrypto/mbuf.c | 13 | ||||
-rw-r--r-- | contrib/pgcrypto/mbuf.h | 2 | ||||
-rw-r--r-- | contrib/pgcrypto/pgp.c | 10 | ||||
-rw-r--r-- | contrib/pgcrypto/pgp.h | 1 |
4 files changed, 0 insertions, 26 deletions
diff --git a/contrib/pgcrypto/mbuf.c b/contrib/pgcrypto/mbuf.c index bc668a0e802..99f8957b004 100644 --- a/contrib/pgcrypto/mbuf.c +++ b/contrib/pgcrypto/mbuf.c @@ -59,12 +59,6 @@ mbuf_size(MBuf *mbuf) } int -mbuf_tell(MBuf *mbuf) -{ - return mbuf->read_pos - mbuf->data; -} - -int mbuf_free(MBuf *mbuf) { if (mbuf->own_data) @@ -165,13 +159,6 @@ mbuf_grab(MBuf *mbuf, int len, uint8 **data_p) } int -mbuf_rewind(MBuf *mbuf) -{ - mbuf->read_pos = mbuf->data; - return 0; -} - -int mbuf_steal_data(MBuf *mbuf, uint8 **data_p) { int len = mbuf_size(mbuf); diff --git a/contrib/pgcrypto/mbuf.h b/contrib/pgcrypto/mbuf.h index e6d754e8695..adb18430b71 100644 --- a/contrib/pgcrypto/mbuf.h +++ b/contrib/pgcrypto/mbuf.h @@ -78,13 +78,11 @@ struct PullFilterOps */ MBuf *mbuf_create(int len); MBuf *mbuf_create_from_data(uint8 *data, int len); -int mbuf_tell(MBuf *mbuf); int mbuf_avail(MBuf *mbuf); int mbuf_size(MBuf *mbuf); int mbuf_grab(MBuf *mbuf, int len, uint8 **data_p); int mbuf_steal_data(MBuf *mbuf, uint8 **data_p); int mbuf_append(MBuf *dst, const uint8 *buf, int cnt); -int mbuf_rewind(MBuf *mbuf); int mbuf_free(MBuf *mbuf); /* diff --git a/contrib/pgcrypto/pgp.c b/contrib/pgcrypto/pgp.c index 3e9c2fef9bc..8a6a6c2adf1 100644 --- a/contrib/pgcrypto/pgp.c +++ b/contrib/pgcrypto/pgp.c @@ -133,16 +133,6 @@ pgp_get_digest_name(int code) return NULL; } -const char * -pgp_get_cipher_name(int code) -{ - const struct cipher_info *i = get_cipher_info(code); - - if (i != NULL) - return i->name; - return NULL; -} - int pgp_get_cipher_key_size(int code) { diff --git a/contrib/pgcrypto/pgp.h b/contrib/pgcrypto/pgp.h index f338523b7a6..805f01af5b2 100644 --- a/contrib/pgcrypto/pgp.h +++ b/contrib/pgcrypto/pgp.h @@ -244,7 +244,6 @@ int pgp_free(PGP_Context *ctx); int pgp_get_digest_code(const char *name); int pgp_get_cipher_code(const char *name); const char *pgp_get_digest_name(int code); -const char *pgp_get_cipher_name(int code); int pgp_set_cipher_algo(PGP_Context *ctx, const char *name); int pgp_set_s2k_mode(PGP_Context *ctx, int type); |