diff options
author | wpaul <wpaul@FreeBSD.org> | 1995-04-18 14:10:21 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 1995-04-18 14:10:21 +0000 |
commit | 20817a2ce307e22ba19e30595a78cc5dc1024920 (patch) | |
tree | 5d86e6095df7caa6ff5b51f4067773b60cc13345 /sys/kern/kern_lkm.c | |
parent | ca71c94b25012c7a4fe1063b00f75516d493cb41 (diff) | |
download | FreeBSD-src-20817a2ce307e22ba19e30595a78cc5dc1024920.zip FreeBSD-src-20817a2ce307e22ba19e30595a78cc5dc1024920.tar.gz |
Couple of small cosmetic changes:
- Add $Id$ string.
- Fix comment ("we might *not* be able to unload the
module afterwards without panicking...")
- Get rid of variable 'j' that I used in name checking
for(;;) loop and use 'i' instead (I thought there'd be
a problem with this, but there isn't).
Diffstat (limited to 'sys/kern/kern_lkm.c')
-rw-r--r-- | sys/kern/kern_lkm.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/sys/kern/kern_lkm.c b/sys/kern/kern_lkm.c index ebcf101..0760773 100644 --- a/sys/kern/kern_lkm.c +++ b/sys/kern/kern_lkm.c @@ -29,6 +29,8 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $Id$ */ /* @@ -179,7 +181,7 @@ lkmcioctl(dev, cmd, data, flag) int flag; { int err = 0; - int i, j; + int i; struct lmc_resrv *resrvp; struct lmc_loadbuf *loadbufp; struct lmc_unload *unloadp; @@ -296,7 +298,7 @@ lkmcioctl(dev, cmd, data, flag) * Check that this isn't a duplicate module (broken * modules are too stupid to check this for * themselves). We must do this *BEFORE* we call - * the entry point of the module, since we might + * the entry point of the module, since we might not * be able to unload the module aftwewards without * panicking the system. This defeats the purpose of * the lkmexists() checking that takes place for @@ -305,11 +307,11 @@ lkmcioctl(dev, cmd, data, flag) * XXX FIXME: Name matching can easily be defeated if * the user renames the module. :( */ - for (j = 0; j < MAXLKMS; j++) { - if (!lkmods[j].used || &lkmods[j] == curp) + for (i = 0; i < MAXLKMS; i++) { + if (!lkmods[i].used || &lkmods[i] == curp) continue; if (!strcmp(modname, - lkmods[j].private.lkm_any->lkm_name)) { + lkmods[i].private.lkm_any->lkm_name)) { lkm_state = LKMS_UNLOADING; lkmunreserve(); curp->used = 0; |