Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/rump/net/lib/libshmif "fix" completely crackheaded code ...
details: https://anonhg.NetBSD.org/src/rev/ca9527ea2c53
branches: trunk
changeset: 758808:ca9527ea2c53
user: pooka <pooka%NetBSD.org@localhost>
date: Mon Nov 15 23:59:06 2010 +0000
description:
"fix" completely crackheaded code w/ uninitialized use,
missed as usual by the wonderful -g -O0
diffstat:
sys/rump/net/lib/libshmif/if_shmem.c | 9 ++++-----
1 files changed, 4 insertions(+), 5 deletions(-)
diffs (32 lines):
diff -r 8f3521d3c2d5 -r ca9527ea2c53 sys/rump/net/lib/libshmif/if_shmem.c
--- a/sys/rump/net/lib/libshmif/if_shmem.c Mon Nov 15 23:51:06 2010 +0000
+++ b/sys/rump/net/lib/libshmif/if_shmem.c Mon Nov 15 23:59:06 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: if_shmem.c,v 1.29 2010/11/15 22:48:06 pooka Exp $ */
+/* $NetBSD: if_shmem.c,v 1.30 2010/11/15 23:59:06 pooka Exp $ */
/*
* Copyright (c) 2009 Antti Kantee. All Rights Reserved.
@@ -28,7 +28,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.29 2010/11/15 22:48:06 pooka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_shmem.c,v 1.30 2010/11/15 23:59:06 pooka Exp $");
#include <sys/param.h>
#include <sys/atomic.h>
@@ -277,11 +277,10 @@
static int
shmif_clone(struct if_clone *ifc, int unit)
{
- int mynum;
/* not atomic against rump_shmif_create(). so "don't do it". */
- if (unit >= mynum)
- mynum = unit+1;
+ if (unit >= numif)
+ numif = unit+1;
return allocif(unit, NULL);
}
Home |
Main Index |
Thread Index |
Old Index