Source-Changes-HG archive

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

[src/trunk]: src/sbin/dump should be safer to cast to u_long than to cast dow...



details:   https://anonhg.NetBSD.org/src/rev/c9ccb10a0722
branches:  trunk
changeset: 539444:c9ccb10a0722
user:      itojun <itojun%NetBSD.org@localhost>
date:      Sun Nov 17 04:49:18 2002 +0000

description:
should be safer to cast to u_long than to cast down to int

diffstat:

 sbin/dump/main.c |  9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r aff368368bc7 -r c9ccb10a0722 sbin/dump/main.c
--- a/sbin/dump/main.c  Sun Nov 17 04:44:42 2002 +0000
+++ b/sbin/dump/main.c  Sun Nov 17 04:49:18 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: main.c,v 1.52 2002/11/17 04:44:42 tsutsui Exp $        */
+/*     $NetBSD: main.c,v 1.53 2002/11/17 04:49:18 itojun Exp $ */
 
 /*-
  * Copyright (c) 1980, 1991, 1993, 1994
@@ -43,7 +43,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c     8.6 (Berkeley) 5/1/95";
 #else
-__RCSID("$NetBSD: main.c,v 1.52 2002/11/17 04:44:42 tsutsui Exp $");
+__RCSID("$NetBSD: main.c,v 1.53 2002/11/17 04:49:18 itojun Exp $");
 #endif
 #endif /* not lint */
 
@@ -205,8 +205,9 @@
                        if (strlcpy(labelstr, optarg, sizeof(labelstr))
                            >= sizeof(labelstr)) {
                                msg(
-               "WARNING Label `%s' is larger than limit of %d characters.\n",
-                                   optarg, (int)sizeof(labelstr) - 1);
+               "WARNING Label `%s' is larger than limit of %lu characters.\n",
+                                   optarg,
+                                   (unsigned long)sizeof(labelstr) - 1);
                                msg("WARNING: Using truncated label `%s'.\n",
                                    labelstr);
                        }



Home | Main Index | Thread Index | Old Index