]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/gengtype-parse.c
Correct a function pre/postcondition [PR102403].
[thirdparty/gcc.git] / gcc / gengtype-parse.c
index 954ac2a04e8dfc93aaf25555a4ffa640c33a6f36..8ec83ce2dd85f2500ee0286f085c6588786cccf9 100644 (file)
@@ -1,5 +1,5 @@
 /* Process source files and output type information.
-   Copyright (C) 2006-2016 Free Software Foundation, Inc.
+   Copyright (C) 2006-2021 Free Software Foundation, Inc.
 
    This file is part of GCC.
 
@@ -948,9 +948,9 @@ type (options_p *optsp, bool nested)
                advance ();
                const char *basename = require (ID);
                /* This may be either an access specifier, or the base name.  */
-               if (0 == strcmp (basename, "public")
-                   || 0 == strcmp (basename, "protected")
-                   || 0 == strcmp (basename, "private"))
+               if (strcmp (basename, "public") == 0
+                   || strcmp (basename, "protected") == 0
+                   || strcmp (basename, "private") == 0)
                  basename = require (ID);
                base_class = find_structure (basename, TYPE_STRUCT);
                if (!base_class)