Skip to content

Commit

Permalink
Prefer inline for single liner
Browse files Browse the repository at this point in the history
  • Loading branch information
jarun committed Oct 20, 2021
1 parent 24b71bc commit 53fbab1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/nnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -167,8 +167,8 @@
#define ISBLANK(x) ((x) == ' ' || (x) == '\t')
#define TOUPPER(ch) (((ch) >= 'a' && (ch) <= 'z') ? ((ch) - 'a' + 'A') : (ch))
#define TOLOWER(ch) (((ch) >= 'A' && (ch) <= 'Z') ? ((ch) - 'A' + 'a') : (ch))
#define ISUPPER_(ch) ((ch) >= 'A' && (ch) <= 'Z')
#define ISLOWER_(ch) ((ch) >= 'a' && (ch) <= 'z')
#define ISUPPER_(ch) ((ch) >= 'A' && (ch) <= 'Z')
#define ISLOWER_(ch) ((ch) >= 'a' && (ch) <= 'z')
#define CMD_LEN_MAX (PATH_MAX + ((NAME_MAX + 1) << 1))
#define ALIGN_UP(x, A) ((((x) + (A) - 1) / (A)) * (A))
#define READLINE_MAX 256
Expand Down Expand Up @@ -1016,7 +1016,7 @@ static bool is_suffix(const char *restrict str, const char *restrict suffix)
return (xstrcmp(str + (lenstr - lensuffix), suffix) == 0);
}

static bool is_prefix(const char *restrict str, const char *restrict prefix, size_t len)
static inline bool is_prefix(const char *restrict str, const char *restrict prefix, size_t len)
{
return !strncmp(str, prefix, len);
}
Expand Down

0 comments on commit 53fbab1

Please sign in to comment.