Skip to content

Commit 10153eb

Browse files
authored
Remove redundant conditions (#113)
1 parent 054c7f6 commit 10153eb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/lexer.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ int macro_return_idx;
9494

9595
int is_whitespace(char c)
9696
{
97-
return (c == ' ' || c == '\t');
97+
return c == ' ' || c == '\t';
9898
}
9999

100100
char peek_char(int offset);
@@ -107,7 +107,7 @@ int is_linebreak(char c)
107107

108108
int is_newline(char c)
109109
{
110-
return (c == '\r' || c == '\n');
110+
return c == '\r' || c == '\n';
111111
}
112112

113113
/* is it alphabet, number or '_'? */
@@ -119,7 +119,7 @@ int is_alnum(char c)
119119

120120
int is_digit(char c)
121121
{
122-
return (c >= '0' && c <= '9') ? 1 : 0;
122+
return c >= '0' && c <= '9';
123123
}
124124

125125
int is_hex(char c)

0 commit comments

Comments
 (0)