From ec25979447b09387c8152d570581d963df91261e Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Fri, 20 Aug 2010 13:03:51 +0200 Subject: [PATCH] libmount: remove unused mnt_strconcat3() Signed-off-by: Karel Zak --- shlibs/mount/src/mountP.h | 2 -- shlibs/mount/src/utils.c | 27 --------------------------- 2 files changed, 29 deletions(-) diff --git a/shlibs/mount/src/mountP.h b/shlibs/mount/src/mountP.h index ddd86ea2..6145b730 100644 --- a/shlibs/mount/src/mountP.h +++ b/shlibs/mount/src/mountP.h @@ -70,8 +70,6 @@ extern char *strndup(const char *s, size_t n); extern char *strnchr(const char *s, size_t maxlen, int c); #endif extern char *mnt_get_username(const uid_t uid); -extern char *mnt_strconcat3(char *s, const char *t, const char *u); - /* * Generic iterator diff --git a/shlibs/mount/src/utils.c b/shlibs/mount/src/utils.c index f487383a..6133cdd7 100644 --- a/shlibs/mount/src/utils.c +++ b/shlibs/mount/src/utils.c @@ -264,33 +264,6 @@ int mnt_match_options(const char *optstr, const char *pattern) return 1; } -/* - * Reallocates its first arg @s - typical use: s = mnt_strconcat3(s,t,u); - * Returns reallocated @s ion succes or NULL in case of error. - */ -char *mnt_strconcat3(char *s, const char *t, const char *u) -{ - size_t len = 0; - - len = (s ? strlen(s) : 0) + (t ? strlen(t) : 0) + (u ? strlen(u) : 0); - - if (!len) - return NULL; - if (!s) { - s = malloc(len + 1); - *s = '\0'; - } else - s = realloc(s, len + 1); - - if (!s) - return NULL; - if (t) - strcat(s, t); - if (u) - strcat(s, u); - return s; -} - /* * Returns allocated string with username or NULL. */ -- 2.39.5