chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
random-util: always cast from smaller to bigger type when comparing
[elogind.git]
/
src
/
basic
/
string-util.h
diff --git
a/src/basic/string-util.h
b/src/basic/string-util.h
index 668b63907566e1cfdf743a0f1915827d66d887fd..e8c2fc6dd38f55c9b0085d1bdeecfcfd39cf440c 100644
(file)
--- 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];
}
return !p || !p[0];
}
-#if 0 /// UNNEEDED by elogind
static inline const char *empty_to_null(const char *p) {
return isempty(p) ? NULL : p;
}
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;
}
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);
}
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);
char *string_erase(char *x);
char *string_free_erase(char *s);