From: Volker Lendecke Date: Wed, 30 Nov 2022 13:17:29 +0000 (+0100) Subject: lib: Remove unused octal_string() X-Git-Tag: talloc-2.4.0~353 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=0b070db63b95cff0dbc055c199890b70b10f7d4b;p=thirdparty%2Fsamba.git lib: Remove unused octal_string() Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/include/proto.h b/source3/include/proto.h index 6612dd9fd28..3d3cd93d5bc 100644 --- a/source3/include/proto.h +++ b/source3/include/proto.h @@ -540,7 +540,6 @@ char *realloc_string_sub(char *string, const char *pattern, const char *insert); void all_string_sub(char *s,const char *pattern,const char *insert, size_t len); -char *octal_string(int i); char *string_truncate(char *s, unsigned int length); char *strchr_m(const char *src, char c); char *strrchr_m(const char *s, char c); diff --git a/source3/lib/util_str.c b/source3/lib/util_str.c index 9362969795e..3ac1e554246 100644 --- a/source3/lib/util_str.c +++ b/source3/lib/util_str.c @@ -181,24 +181,6 @@ bool in_list(const char *s, const char *list, bool casesensitive) return ret; } -/** - Write an octal as a string. -**/ - -char *octal_string(int i) -{ - char *result; - if (i == -1) { - result = talloc_strdup(talloc_tos(), "-1"); - } - else { - result = talloc_asprintf(talloc_tos(), "0%o", i); - } - SMB_ASSERT(result != NULL); - return result; -} - - /** Truncate a string at a specified length. **/