]> git.draconx.ca Git - cdecl99.git/commitdiff
Fix return value of typespec checks.
authorNick Bowler <nbowler@draconx.ca>
Sat, 16 Jul 2011 17:30:10 +0000 (13:30 -0400)
committerNick Bowler <nbowler@draconx.ca>
Mon, 18 Jul 2011 23:23:51 +0000 (19:23 -0400)
Returning -1 here means "true"; we actually want to return "false".

src/parse-decl.c

index 47b60a346824301635eec8fa207fa2562946bdbb..bce0afe186644d5f8968630ef830cbdf362f11e1 100644 (file)
@@ -51,8 +51,7 @@ static bool valid_declspecs(struct cdecl *decl, bool top)
 
        typemap = cdecl__build_typemap(specs);
        if (typemap == -1)
-               return -1;
-
+               return false;
 
        for (struct cdecl_declspec *c = specs; c; c = c->next) {
                switch (cdecl_spec_kind(c)) {