Source-Changes-HG archive

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

[src/trunk]: src/dist/ipf/lib Since the return value from openkmem() is not u...



details:   https://anonhg.NetBSD.org/src/rev/8ddfd3f6ff24
branches:  trunk
changeset: 560097:8ddfd3f6ff24
user:      he <he%NetBSD.org@localhost>
date:      Sun Mar 28 14:15:38 2004 +0000

description:
Since the return value from openkmem() is not used as a token for
subsequent operations, just as a success/failure indicator, return
(kvm_f != NULL) instead of the non-portable cast (int)kvm_f.

diffstat:

 dist/ipf/lib/kmem.c |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (18 lines):

diff -r c716163233c0 -r 8ddfd3f6ff24 dist/ipf/lib/kmem.c
--- a/dist/ipf/lib/kmem.c       Sun Mar 28 14:06:26 2004 +0000
+++ b/dist/ipf/lib/kmem.c       Sun Mar 28 14:15:38 2004 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: kmem.c,v 1.1.1.1 2004/03/28 08:56:19 martti Exp $      */
+/*     $NetBSD: kmem.c,v 1.2 2004/03/28 14:15:38 he Exp $      */
 
 /*
  * Copyright (C) 1993-2001 by Darren Reed.
@@ -134,7 +134,7 @@
                perror("openkmem:open");
                return -1;
            }
-       return (int)kvm_f;
+       return kvm_f != NULL;
 }
 
 int    kmemcpy(buf, pos, n)



Home | Main Index | Thread Index | Old Index