From 0098cba07408b1364373117b239dae9d86620cdb Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 29 Aug 2017 18:56:16 +0200 Subject: style: consistent casts --- lr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lr.c') diff --git a/lr.c b/lr.c index 2c79425..1d22bcf 100644 --- a/lr.c +++ b/lr.c @@ -305,7 +305,7 @@ mkexpr(enum op op) static void ws() { - while (isspace((unsigned char) *pos)) + while (isspace((unsigned char)*pos)) pos++; } @@ -325,12 +325,12 @@ static int64_t parse_num(int64_t *r) { char *s = pos; - if (isdigit((unsigned char) *pos)) { + if (isdigit((unsigned char)*pos)) { int64_t n; - for (n = 0; isdigit((unsigned char) *pos) && n <= INT64_MAX / 10 - 10; pos++) + for (n = 0; isdigit((unsigned char)*pos) && n <= INT64_MAX / 10 - 10; pos++) n = 10 * n + (*pos - '0'); - if (isdigit((unsigned char) *pos)) + if (isdigit((unsigned char)*pos)) parse_error("number too big: %s", s); if (token("c")) ; else if (token("b")) n *= 512LL; @@ -495,13 +495,13 @@ parse_string(char **s) buf[len] = 0; pos++; ws(); - *s = buf ? buf : (char *) ""; + *s = buf ? buf : (char *)""; return 1; } else if (*pos == '$') { char t; char *e = ++pos; - while (isalnum((unsigned char) *pos) || *pos == '_') + while (isalnum((unsigned char)*pos) || *pos == '_') pos++; if (e == pos) parse_error("invalid environment variable name"); @@ -1125,7 +1125,7 @@ xattr_string(const char *f) return buf; #else static char empty[] = ""; - (void) f; + (void)f; return empty; // No support for xattrs on this platform. #endif } -- cgit 1.4.1