Module Name: src Committed By: pooka Date: Mon Nov 15 23:59:06 UTC 2010
Modified Files: src/sys/rump/net/lib/libshmif: if_shmem.c Log Message: "fix" completely crackheaded code w/ uninitialized use, missed as usual by the wonderful -g -O0 To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/rump/net/lib/libshmif/if_shmem.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/rump/net/lib/libshmif/if_shmem.c diff -u src/sys/rump/net/lib/libshmif/if_shmem.c:1.29 src/sys/rump/net/lib/libshmif/if_shmem.c:1.30 --- src/sys/rump/net/lib/libshmif/if_shmem.c:1.29 Mon Nov 15 22:48:06 2010 +++ src/sys/rump/net/lib/libshmif/if_shmem.c Mon Nov 15 23:59:06 2010 @@ -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); }