remove hasprefix(), use startswith()

This commit is contained in:
Shawn Landden
2013-08-22 00:52:14 -04:00
committed by Zbigniew Jędrzejewski-Szmek
parent 67c15b9a7a
commit 2a0e069256
6 changed files with 21 additions and 25 deletions
+1 -1
View File
@@ -536,7 +536,7 @@ static int output_export(
/* We already printed the boot id, from the data in
* the header, hence let's suppress it here */
if (length >= 9 &&
hasprefix(data, "_BOOT_ID="))
startswith(data, "_BOOT_ID="))
continue;
if (!utf8_is_printable(data, length)) {
-2
View File
@@ -186,8 +186,6 @@ static inline size_t ALIGN_TO(size_t l, size_t ali) {
#define char_array_0(x) x[sizeof(x)-1] = 0;
#define hasprefix(s, prefix) (memcmp(s, prefix, strlen(prefix)) == 0)
#define IOVEC_SET_STRING(i, s) \
do { \
struct iovec *_i = &(i); \