Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 1d3566f

Browse files
pgcrypto: Remove unused code
The mbuf_tell, mbuf_rewind and pgp_get_cipher_name functions were introduced in commit e94dd6a, but were never used, so remove. Reviewed-by: Aleksander Alekseev <aleksander@timescale.com> Discussion: https://postgr.es/m/FCF3F14E-17D5-41F2-AC58-0A97B341193A@yesql.se
1 parent 5f84647 commit 1d3566f

File tree

4 files changed

+0
-26
lines changed

4 files changed

+0
-26
lines changed

contrib/pgcrypto/mbuf.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,6 @@ mbuf_size(MBuf *mbuf)
5858
return mbuf->data_end - mbuf->data;
5959
}
6060

61-
int
62-
mbuf_tell(MBuf *mbuf)
63-
{
64-
return mbuf->read_pos - mbuf->data;
65-
}
66-
6761
int
6862
mbuf_free(MBuf *mbuf)
6963
{
@@ -164,13 +158,6 @@ mbuf_grab(MBuf *mbuf, int len, uint8 **data_p)
164158
return len;
165159
}
166160

167-
int
168-
mbuf_rewind(MBuf *mbuf)
169-
{
170-
mbuf->read_pos = mbuf->data;
171-
return 0;
172-
}
173-
174161
int
175162
mbuf_steal_data(MBuf *mbuf, uint8 **data_p)
176163
{

contrib/pgcrypto/mbuf.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,11 @@ struct PullFilterOps
7878
*/
7979
MBuf *mbuf_create(int len);
8080
MBuf *mbuf_create_from_data(uint8 *data, int len);
81-
int mbuf_tell(MBuf *mbuf);
8281
int mbuf_avail(MBuf *mbuf);
8382
int mbuf_size(MBuf *mbuf);
8483
int mbuf_grab(MBuf *mbuf, int len, uint8 **data_p);
8584
int mbuf_steal_data(MBuf *mbuf, uint8 **data_p);
8685
int mbuf_append(MBuf *dst, const uint8 *buf, int cnt);
87-
int mbuf_rewind(MBuf *mbuf);
8886
int mbuf_free(MBuf *mbuf);
8987

9088
/*

contrib/pgcrypto/pgp.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,6 @@ pgp_get_digest_name(int code)
133133
return NULL;
134134
}
135135

136-
const char *
137-
pgp_get_cipher_name(int code)
138-
{
139-
const struct cipher_info *i = get_cipher_info(code);
140-
141-
if (i != NULL)
142-
return i->name;
143-
return NULL;
144-
}
145-
146136
int
147137
pgp_get_cipher_key_size(int code)
148138
{

contrib/pgcrypto/pgp.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,6 @@ int pgp_free(PGP_Context *ctx);
244244
int pgp_get_digest_code(const char *name);
245245
int pgp_get_cipher_code(const char *name);
246246
const char *pgp_get_digest_name(int code);
247-
const char *pgp_get_cipher_name(int code);
248247

249248
int pgp_set_cipher_algo(PGP_Context *ctx, const char *name);
250249
int pgp_set_s2k_mode(PGP_Context *ctx, int type);

0 commit comments

Comments
 (0)