util-strings: drop unused safe_strdup()

Not used anywhere.

Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This commit is contained in:
Enrico Weigelt, metux IT consult
2025-04-16 12:39:36 +02:00
parent 87dc6b6a3e
commit 8a743e7740

View File

@@ -60,25 +60,6 @@ zalloc(size_t size)
return p;
}
/**
* strdup guaranteed to succeed. If the input string is NULL, the output
* string is NULL. If the input string is a string pointer, we strdup or
* abort on failure.
*/
static inline char*
safe_strdup(const char *str)
{
char *s;
if (!str)
return NULL;
s = strdup(str);
if (!s)
abort();
return s;
}
static inline bool
safe_atoi_base(const char *str, int *val, int base)
{