remove cast

C99+TC3, 7.19.7.1p2: [...] the fgetc function obtains that character as
an unsigned char converted to an int [...]
This commit is contained in:
cremno
2014-11-19 22:41:51 +01:00
parent 88195a7c99
commit 337395c1ee
@@ -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);
}
}