diff mbox

btrfs-progs: remove unused function path_cat and path_cat3

Message ID 1523252610-4843-1-git-send-email-gujx@cn.fujitsu.com (mailing list archive)
State New, archived
Headers show

Commit Message

Gu Jinxiang April 9, 2018, 5:43 a.m. UTC
Since function path_cat and path_cat3 are not used anymore, remove them.

Signed-off-by: Gu Jinxiang <gujx@cn.fujitsu.com>
---
 send-utils.c | 25 -------------------------
 send-utils.h |  9 ---------
 2 files changed, 34 deletions(-)

Comments

David Sterba April 9, 2018, 1:30 p.m. UTC | #1
On Mon, Apr 09, 2018 at 01:43:30PM +0800, Gu Jinxiang wrote:
> Since function path_cat and path_cat3 are not used anymore, remove them.

It's good to document when the functions where deprecated, 4.0, which
lets us check that the period was long enough for any users to adapt as
it's in the public interface.

Anyway, 16 releases should be enough. Applied.
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/send-utils.c b/send-utils.c
index b5289e76..3ecbdea6 100644
--- a/send-utils.c
+++ b/send-utils.c
@@ -757,18 +757,6 @@  int path_cat_out(char *out, const char *p1, const char *p2)
 	return 0;
 }
 
-__attribute__((deprecated))
-char *path_cat(const char *p1, const char *p2)
-{
-	int p1_len = strlen(p1);
-	int p2_len = strlen(p2);
-	char *new = malloc(p1_len + p2_len + 2);
-
-	path_cat_out(new, p1, p2);
-
-	return new;
-}
-
 int path_cat3_out(char *out, const char *p1, const char *p2, const char *p3)
 {
 	int p1_len = strlen(p1);
@@ -788,16 +776,3 @@  int path_cat3_out(char *out, const char *p1, const char *p2, const char *p3)
 
 	return 0;
 }
-
-__attribute__((deprecated))
-char *path_cat3(const char *p1, const char *p2, const char *p3)
-{
-	int p1_len = strlen(p1);
-	int p2_len = strlen(p2);
-	int p3_len = strlen(p3);
-	char *new = malloc(p1_len + p2_len + p3_len + 3);
-
-	path_cat3_out(new, p1, p2, p3);
-
-	return new;
-}
diff --git a/send-utils.h b/send-utils.h
index e8f86912..5f5e096f 100644
--- a/send-utils.h
+++ b/send-utils.h
@@ -104,15 +104,6 @@  void subvol_uuid_search_add(struct subvol_uuid_search *s,
 
 int btrfs_subvolid_resolve(int fd, char *path, size_t path_len, u64 subvol_id);
 
-/*
- * DEPRECATED: the functions path_cat and path_cat3 are unsafe and should not
- * be used, use the _out variants and always check the return code.
- */
-__attribute__((deprecated))
-char *path_cat(const char *p1, const char *p2);
-__attribute__((deprecated))
-char *path_cat3(const char *p1, const char *p2, const char *p3);
-
 int path_cat_out(char *out, const char *p1, const char *p2);
 int path_cat3_out(char *out, const char *p1, const char *p2, const char *p3);