[Midnightbsd-cvs] src [10779] trunk/usr.bin/xlint/common: sync

laffer1 at midnightbsd.org laffer1 at midnightbsd.org
Sat Jun 9 22:40:58 EDT 2018


Revision: 10779
          http://svnweb.midnightbsd.org/src/?rev=10779
Author:   laffer1
Date:     2018-06-09 22:40:58 -0400 (Sat, 09 Jun 2018)
Log Message:
-----------
sync

Modified Paths:
--------------
    trunk/usr.bin/xlint/common/emit.c
    trunk/usr.bin/xlint/common/lint.h
    trunk/usr.bin/xlint/common/mem.c

Modified: trunk/usr.bin/xlint/common/emit.c
===================================================================
--- trunk/usr.bin/xlint/common/emit.c	2018-06-10 02:40:46 UTC (rev 10778)
+++ trunk/usr.bin/xlint/common/emit.c	2018-06-10 02:40:58 UTC (rev 10779)
@@ -33,6 +33,9 @@
  */
 
 #include <sys/cdefs.h>
+#if defined(__RCSID) && !defined(lint)
+__RCSID("$NetBSD: emit.c,v 1.2 2002/01/21 19:49:51 tv Exp $");
+#endif
 
 #include <ctype.h>
 #include <stdio.h>

Modified: trunk/usr.bin/xlint/common/lint.h
===================================================================
--- trunk/usr.bin/xlint/common/lint.h	2018-06-10 02:40:46 UTC (rev 10778)
+++ trunk/usr.bin/xlint/common/lint.h	2018-06-10 02:40:58 UTC (rev 10779)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/*	$NetBSD: lint.h,v 1.5 2002/03/07 18:29:56 tv Exp $	*/
+/*	$NetBSD: lint.h,v 1.7 2003/10/27 00:12:44 lukem Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -30,6 +30,8 @@
  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * $FreeBSD: stable/10/usr.bin/xlint/common/lint.h 281168 2015-04-06 19:56:27Z pfg $
  */
 
 #if HAVE_CONFIG_H
@@ -91,7 +93,7 @@
 	u_int	tt_isftyp : 1;		/* 1 if floating point type */
 	u_int	tt_isatyp : 1;		/* 1 if arithmetic type */
 	u_int	tt_issclt : 1;		/* 1 if scalar type */
-	char	*tt_name;		/* Bezeichnung des Typs */
+	const char *tt_name;		/* Bezeichnung des Typs */
 } ttab_t;
 
 #define size(t)		(ttab[t].tt_sz)

Modified: trunk/usr.bin/xlint/common/mem.c
===================================================================
--- trunk/usr.bin/xlint/common/mem.c	2018-06-10 02:40:46 UTC (rev 10778)
+++ trunk/usr.bin/xlint/common/mem.c	2018-06-10 02:40:58 UTC (rev 10779)
@@ -1,5 +1,5 @@
 /* $MidnightBSD$ */
-/*	$NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $	*/
+/*	$NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -34,8 +34,9 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: mem.c,v 1.2 2002/01/21 19:49:51 tv Exp $");
+__RCSID("$NetBSD: mem.c,v 1.4 2003/10/16 06:35:26 itojun Exp $");
 #endif
+__FBSDID("$FreeBSD: stable/10/usr.bin/xlint/common/mem.c 281168 2015-04-06 19:56:27Z pfg $");
 
 #include <stdlib.h>
 #include <string.h>
@@ -65,9 +66,13 @@
 void *
 xrealloc(void *p, size_t s)
 {
+	void *n;
 
-	if ((p = realloc(p, s)) == NULL)
+	if ((n = realloc(p, s)) == NULL) {
+		free(p);
 		nomem();
+	}
+	p = n;
 	return (p);
 }
 



More information about the Midnightbsd-cvs mailing list