From 2a0e0692565f0435657c93498e09cbb2d3517152 Mon Sep 17 00:00:00 2001 From: Shawn Landden Date: Wed, 21 Aug 2013 18:20:55 -0700 Subject: remove hasprefix(), use startswith() --- src/shared/logs-show.c | 2 +- src/shared/macro.h | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) (limited to 'src/shared') diff --git a/src/shared/logs-show.c b/src/shared/logs-show.c index f0236eeae5..87633e7816 100644 --- a/src/shared/logs-show.c +++ b/src/shared/logs-show.c @@ -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)) { diff --git a/src/shared/macro.h b/src/shared/macro.h index 0d3ff1cda5..d4f92b60ec 100644 --- a/src/shared/macro.h +++ b/src/shared/macro.h @@ -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); \ -- cgit v1.2.3-54-g00ecf