Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make Cast sizeof() to int, which is sufficent and co...



details:   https://anonhg.NetBSD.org/src/rev/a42c61abfe77
branches:  trunk
changeset: 781296:a42c61abfe77
user:      sjg <sjg%NetBSD.org@localhost>
date:      Fri Aug 31 07:00:36 2012 +0000

description:
Cast sizeof() to int, which is sufficent and consistent with other use
within make.

diffstat:

 usr.bin/make/main.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (45 lines):

diff -r ed0086e12325 -r a42c61abfe77 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Fri Aug 31 05:22:17 2012 +0000
+++ b/usr.bin/make/main.c       Fri Aug 31 07:00:36 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $      */
+/*     $NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $   */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.202 2012/08/31 02:59:37 pgoyette Exp $");
+__RCSID("$NetBSD: main.c,v 1.203 2012/08/31 07:00:36 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1235,7 +1235,7 @@
                        } else if (expandVars) {
                                char tmp[128];
                                                                
-                               if (snprintf(tmp, sizeof(tmp), "${%s}", var) >= (ssize_t)(sizeof(tmp)))
+                               if (snprintf(tmp, sizeof(tmp), "${%s}", var) >= (int)(sizeof(tmp)))
                                        Fatal("%s: variable name too big: %s",
                                              progname, var);
                                value = p1 = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
@@ -2051,7 +2051,7 @@
     char tmp[64];
     char *cp;
 
-    if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < (ssize_t)(sizeof(tmp))) {
+    if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < (int)(sizeof(tmp))) {
        cp = Var_Subst(NULL, tmp, VAR_GLOBAL, 0);
 
        if (cp) {



Home | Main Index | Thread Index | Old Index