From c0ceea9c799aa224c13ddc90edd8bc73b05cb971 Mon Sep 17 00:00:00 2001 From: Fredrik Holmqvist Date: Sun, 22 Apr 2018 12:09:56 +0200 Subject: [PATCH] Remove unused var and always true check. Clean redeclaration. --- src/libs/compat/freebsd11_network/compat.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/libs/compat/freebsd11_network/compat.c b/src/libs/compat/freebsd11_network/compat.c index 4ac2a67beb..ad2c893523 100644 --- a/src/libs/compat/freebsd11_network/compat.c +++ b/src/libs/compat/freebsd11_network/compat.c @@ -272,7 +272,6 @@ device_get_flags(device_t dev) int device_set_driver(device_t dev, driver_t *driver) { - device_method_signature_t method = NULL; int i; dev->softc = malloc(driver->softc_size); @@ -282,7 +281,7 @@ device_set_driver(device_t dev, driver_t *driver) memset(dev->softc, 0, driver->softc_size); dev->driver = driver; - for (i = 0; method == NULL && driver->methods[i].name != NULL; i++) { + for (i = 0; driver->methods[i].name != NULL; i++) { device_method_t *mth = &driver->methods[i]; if (strcmp(mth->name, "device_probe") == 0) @@ -464,9 +463,7 @@ device_detach(device_t device) if ((atomic_and(&device->flags, ~DEVICE_ATTACHED) & DEVICE_ATTACHED) != 0 && device->methods.detach != NULL) { - int result = B_OK; - - result = stop_wlan(device); + int result = stop_wlan(device); if (result != 0) { atomic_or(&device->flags, DEVICE_ATTACHED); return result;