Skip to content

Commit f163f51

Browse files
committed
fix: compiler warning
1 parent a24dc20 commit f163f51

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

chapter_1/exercise_1_13/histogram.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ int main(void)
2323
// specific index
2424
char c;
2525
int word_count_index = 0;
26-
while (c = getchar())
26+
while ((c = getchar()))
2727
{
2828
if (c == ' ' || c == '\t' || c == '\n' || c == EOF)
2929
{
@@ -43,10 +43,10 @@ int main(void)
4343

4444
word_count_index = 0;
4545
}
46-
if (c == EOF)
46+
if (c == EOF)
4747
{
4848
break;
49-
}
49+
}
5050
}
5151
else
5252
{

0 commit comments

Comments
 (0)