From 6bcb03dda1f92ee50819748edb55c5a99820b1ed Mon Sep 17 00:00:00 2001 From: Gu Jinxiang Date: Mon, 9 Apr 2018 13:43:30 +0800 Subject: [PATCH] btrfs-progs: send-utils: remove unused functions path_cat and path_cat3 Since function path_cat and path_cat3 are not used anymore, remove them. They have been reprecated since version 4.0. Signed-off-by: Gu Jinxiang Signed-off-by: David Sterba --- send-utils.c | 25 ------------------------- send-utils.h | 9 --------- 2 files changed, 34 deletions(-) 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);