summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJason McIntyre <jmc@cvs.openbsd.org>2008-07-29 13:53:15 +0000
committerJason McIntyre <jmc@cvs.openbsd.org>2008-07-29 13:53:15 +0000
commit913172cbbc3ec0c75e0b7dd5c2a073df61c22984 (patch)
tree0709b2c76dc92227c02b787f4da8e5965d008408 /lib
parent55b809ec450508d7fab23a7562bd1f0d1af9b6f5 (diff)
example code fix from Will Maier; ok otto
Diffstat (limited to 'lib')
-rw-r--r--lib/libutil/fmt_scaled.36
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libutil/fmt_scaled.3 b/lib/libutil/fmt_scaled.3
index bf1e87e64fe..ebc94968974 100644
--- a/lib/libutil/fmt_scaled.3
+++ b/lib/libutil/fmt_scaled.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: fmt_scaled.3,v 1.4 2007/05/31 19:19:38 jmc Exp $
+.\" $OpenBSD: fmt_scaled.3,v 1.5 2008/07/29 13:53:14 jmc Exp $
.\" Copyright (c) 2001, 2003 Ian Darwin. All rights reserved.
.\"
.\" Redistribution and use in source and binary forms, with or without
@@ -23,7 +23,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: May 31 2007 $
+.Dd $Mdocdate: July 29 2008 $
.Dt FMT_SCALED 3
.Os
.Sh NAME
@@ -85,7 +85,7 @@ was malformed, e.g., too many '.' characters.
.Bd -literal -offset indent
char *cinput = "1.5K";
long long result;
-if (scan_scaled(cinput, &result) != 0)
+if (scan_scaled(cinput, &result) == 0)
printf("%s -> %ld\en", cinput, result);
else
fprintf(stderr, "%s - invalid\en", cinput);