Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sbin/newfs_msdos Set errno to 0 before strtoll() so that it ...
details: https://anonhg.NetBSD.org/src/rev/1a36884c1355
branches: trunk
changeset: 762899:1a36884c1355
user: pooka <pooka%NetBSD.org@localhost>
date: Sat Mar 05 13:47:43 2011 +0000
description:
Set errno to 0 before strtoll() so that it can reliably be tested
afterwards. Fixes newfs_msdos at least on sparc. Incidentally,
the msdosfs tests also start working on sparc, which about halves
the number of test failures on that platform.
diffstat:
sbin/newfs_msdos/newfs_msdos.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
diffs (26 lines):
diff -r 0356b93c7086 -r 1a36884c1355 sbin/newfs_msdos/newfs_msdos.c
--- a/sbin/newfs_msdos/newfs_msdos.c Sat Mar 05 09:47:19 2011 +0000
+++ b/sbin/newfs_msdos/newfs_msdos.c Sat Mar 05 13:47:43 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: newfs_msdos.c,v 1.34 2009/04/11 06:59:18 lukem Exp $ */
+/* $NetBSD: newfs_msdos.c,v 1.35 2011/03/05 13:47:43 pooka Exp $ */
/*
* Copyright (c) 1998 Robert Nordier
@@ -33,7 +33,7 @@
static const char rcsid[] =
"$FreeBSD: src/sbin/newfs_msdos/newfs_msdos.c,v 1.15 2000/10/10 01:49:37 wollman Exp $";
#else
-__RCSID("$NetBSD: newfs_msdos.c,v 1.34 2009/04/11 06:59:18 lukem Exp $");
+__RCSID("$NetBSD: newfs_msdos.c,v 1.35 2011/03/05 13:47:43 pooka Exp $");
#endif
#endif /* not lint */
@@ -922,6 +922,7 @@
char *s;
off_t x;
+ errno = 0;
x = strtoll(arg, &s, 0);
/* allow at most one extra char */
if (errno || x < 0 || (s[0] && s[1]) )
Home |
Main Index |
Thread Index |
Old Index