bfd/
[deliverable/binutils-gdb.git] / gas / input-file.c
index ec36a4269649faa968f43ef5e153a58f2bfa9990..0907bad37c86075bbea1bc4883925e3868a05ece 100644 (file)
@@ -163,8 +163,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0.  */
       c = getc (f_in);
       if (c == 'N')
        {
-         fgets (buf, 80, f_in);
-         if (!strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
+         if (fgets (buf, sizeof (buf), f_in)
+             && !strncmp (buf, "O_APP", 5) && ISSPACE (buf[5]))
            preprocess = 0;
          if (!strchr (buf, '\n'))
            ungetc ('#', f_in); /* It was longer.  */
@@ -173,8 +173,8 @@ input_file_open (char *filename, /* "" means use stdin. Must not be 0.  */
        }
       else if (c == 'A')
        {
-         fgets (buf, 80, f_in);
-         if (!strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
+         if (fgets (buf, sizeof (buf), f_in)
+             && !strncmp (buf, "PP", 2) && ISSPACE (buf[2]))
            preprocess = 1;
          if (!strchr (buf, '\n'))
            ungetc ('#', f_in);
@@ -246,7 +246,7 @@ input_file_give_next_buffer (char *where /* Where to place 1st character of new
   else
     {
       if (fclose (f_in))
-       as_bad (_("can't close %s: %s"), file_name, xstrerror (errno));
+       as_warn (_("can't close %s: %s"), file_name, xstrerror (errno));
 
       f_in = (FILE *) 0;
       return_value = 0;
This page took 0.02559 seconds and 4 git commands to generate.