From: Volker Lendecke Date: Sun, 16 Jan 2022 20:23:56 +0000 (+0100) Subject: lib: Remove unused asprintf_strupper_m() X-Git-Tag: tdb-1.4.6~58 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=12ca34115eabbb430cd0b01afeaaebfac76174d3;p=thirdparty%2Fsamba.git lib: Remove unused asprintf_strupper_m() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/include/includes.h b/source3/include/includes.h index c3d3d351e41..510a0b96539 100644 --- a/source3/include/includes.h +++ b/source3/include/includes.h @@ -341,7 +341,6 @@ int d_fprintf(FILE *f, const char *, ...) PRINTF_ATTRIBUTE(2,3); /* PRINTFLIKE2 */ int fstr_sprintf(fstring s, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); -int asprintf_strupper_m(char **strp, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); /* diff --git a/source3/include/proto.h b/source3/include/proto.h index dba728b3d86..19a9c6b8a01 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -557,8 +557,6 @@ int fstr_sprintf(fstring s, const char *fmt, ...); uint64_t STR_TO_SMB_BIG_UINT(const char *nptr, const char **entptr); uint64_t conv_str_size(const char * str); -int asprintf_strupper_m(char **strp, const char *fmt, ...) - PRINTF_ATTRIBUTE(2,3); char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) PRINTF_ATTRIBUTE(2,3); char *talloc_asprintf_strlower_m(TALLOC_CTX *t, const char *fmt, ...) diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 3c687dc28e8..b1ed43669c0 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -523,32 +523,6 @@ uint64_t conv_str_size(const char * str) return lval; } -/* - * asprintf into a string and strupper_m it after that. - */ - -int asprintf_strupper_m(char **strp, const char *fmt, ...) -{ - va_list ap; - char *result; - int ret; - - va_start(ap, fmt); - ret = vasprintf(&result, fmt, ap); - va_end(ap); - - if (ret == -1) - return -1; - - if (!strupper_m(result)) { - SAFE_FREE(result); - return -1; - } - - *strp = result; - return ret; -} - char *talloc_asprintf_strupper_m(TALLOC_CTX *t, const char *fmt, ...) { va_list ap;