Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/xlint/lint1 Make the return type of "? type1 : void ...



details:   https://anonhg.NetBSD.org/src/rev/b2ef00d3feed
branches:  trunk
changeset: 809732:b2ef00d3feed
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jul 29 18:23:32 2015 +0000

description:
Make the return type of "? type1 : void *" or "? void * : type1" to be type1
instead of void *.

diffstat:

 usr.bin/xlint/lint1/tree.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (33 lines):

diff -r 268b3be14915 -r b2ef00d3feed usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Wed Jul 29 18:22:06 2015 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Wed Jul 29 18:23:32 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.79 2015/07/29 18:22:06 christos Exp $       */
+/*     $NetBSD: tree.c,v 1.80 2015/07/29 18:23:32 christos Exp $       */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.79 2015/07/29 18:22:06 christos Exp $");
+__RCSID("$NetBSD: tree.c,v 1.80 2015/07/29 18:23:32 christos Exp $");
 #endif
 
 #include <stdlib.h>
@@ -2534,12 +2534,12 @@
        } else if (lt == PTR && ln->tn_type->t_subt->t_tspec == VOID) {
                if (rt != PTR)
                        LERROR("bldcol()");
-               rtp = ln->tn_type;
+               rtp = rn->tn_type;
                mrgqual(&rtp, ln->tn_type, rn->tn_type);
        } else if (rt == PTR && rn->tn_type->t_subt->t_tspec == VOID) {
                if (lt != PTR)
                        LERROR("bldcol()");
-               rtp = rn->tn_type;
+               rtp = ln->tn_type;
                mrgqual(&rtp, ln->tn_type, rn->tn_type);
        } else {
                if (lt != PTR || rt != PTR)



Home | Main Index | Thread Index | Old Index