* remote-sim.c (gdbsim_create_inferior): Fix missing parenthesis.
[deliverable/binutils-gdb.git] / gas / input-file.c
index 91ec53092278c13eed7530737d3f0948e6af4bc5..2a36dbfed3906974941b4fce976525a2f713c895 100644 (file)
@@ -1,13 +1,13 @@
 /* input_file.c - Deal with Input Files -
    Copyright 1987, 1990, 1991, 1992, 1993, 1994, 1995, 1999, 2000, 2001,
-   2002, 2003, 2005, 2006
+   2002, 2003, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GAS, the GNU Assembler.
 
    GAS is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 2, or (at your option)
+   the Free Software Foundation; either version 3, or (at your option)
    any later version.
 
    GAS is distributed in the hope that it will be useful,
@@ -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);
This page took 0.023913 seconds and 4 git commands to generate.