Commit 337395c1 authored by cremno's avatar cremno

remove cast

C99+TC3, 7.19.7.1p2: [...] the fgetc function obtains that character as
an unsigned char converted to an int [...]
parent 88195a7c
......@@ -105,7 +105,8 @@ source_file_new(mrb_state *mrb, mrb_debug_context *dbg, char *filename)
static mrb_bool
remove_newlines(char *s, FILE *fp)
{
char c, *p;
int c;
char *p;
size_t len;
if ((len = strlen(s)) == 0) {
......@@ -120,7 +121,7 @@ remove_newlines(char *s, FILE *fp)
if (*p == '\r') {
/* peek the next character and skip '\n' */
if ((unsigned char)(c = fgetc(fp)) != '\n') {
if ((c = fgetc(fp)) != '\n') {
ungetc(c, fp);
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment