v2-0001-pgcrypto-Remove-unused-mbuf-code.patch
application/octet-stream
Filename: v2-0001-pgcrypto-Remove-unused-mbuf-code.patch
Type: application/octet-stream
Part: 0
Message:
Re: Removing dead code in pgcrypto
Patch
Format: format-patch
Series: patch v2-0001
Subject: pgcrypto: Remove unused mbuf code
| File | + | − |
|---|---|---|
| contrib/pgcrypto/mbuf.c | 0 | 13 |
| contrib/pgcrypto/mbuf.h | 0 | 2 |
From 4cc4ed6bff3b60fc26ee1a8164e727ccd5415c2e Mon Sep 17 00:00:00 2001
From: Daniel Gustafsson <dgustafsson@postgresql.org>
Date: Tue, 30 Aug 2022 12:50:14 +0200
Subject: [PATCH v2] pgcrypto: Remove unused mbuf code
The mbuf_tell and mbuf_rewind functions were introduced in commit
e94dd6ab91 but were never used, so remove.
Discussion: https://postgr.es/m/FCF3F14E-17D5-41F2-AC58-0A97B341193A%40yesql.se
---
contrib/pgcrypto/mbuf.c | 13 -------------
contrib/pgcrypto/mbuf.h | 2 --
2 files changed, 15 deletions(-)
diff --git a/contrib/pgcrypto/mbuf.c b/contrib/pgcrypto/mbuf.c
index bc668a0e80..99f8957b00 100644
--- a/contrib/pgcrypto/mbuf.c
+++ b/contrib/pgcrypto/mbuf.c
@@ -58,12 +58,6 @@ mbuf_size(MBuf *mbuf)
return mbuf->data_end - mbuf->data;
}
-int
-mbuf_tell(MBuf *mbuf)
-{
- return mbuf->read_pos - mbuf->data;
-}
-
int
mbuf_free(MBuf *mbuf)
{
@@ -164,13 +158,6 @@ mbuf_grab(MBuf *mbuf, int len, uint8 **data_p)
return len;
}
-int
-mbuf_rewind(MBuf *mbuf)
-{
- mbuf->read_pos = mbuf->data;
- return 0;
-}
-
int
mbuf_steal_data(MBuf *mbuf, uint8 **data_p)
{
diff --git a/contrib/pgcrypto/mbuf.h b/contrib/pgcrypto/mbuf.h
index e6d754e869..adb18430b7 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);
/*
--
2.37.2