X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fbasic%2Fstring-util.h;h=e8c2fc6dd38f55c9b0085d1bdeecfcfd39cf440c;hb=9800a6ceb4801bb1f3e851b2244c84a8d8f116b1;hp=668b63907566e1cfdf743a0f1915827d66d887fd;hpb=5091db1fa99acdbc3d9acb485c1c70d8bfb636db;p=elogind.git diff --git a/src/basic/string-util.h b/src/basic/string-util.h index 668b63907..e8c2fc6dd 100644 --- a/src/basic/string-util.h +++ b/src/basic/string-util.h @@ -66,11 +66,11 @@ static inline bool isempty(const char *p) { return !p || !p[0]; } -#if 0 /// UNNEEDED by elogind static inline const char *empty_to_null(const char *p) { return isempty(p) ? NULL : p; } +#if 0 /// UNNEEDED by elogind static inline const char *strdash_if_empty(const char *str) { return isempty(str) ? "-" : str; } @@ -197,7 +197,10 @@ static inline void *memmem_safe(const void *haystack, size_t haystacklen, const return memmem(haystack, haystacklen, needle, needlelen); } -void* memory_erase(void *p, size_t l); +#if !HAVE_DECL_EXPLICIT_BZERO +void explicit_bzero(void *p, size_t l); +#endif + char *string_erase(char *x); char *string_free_erase(char *s);