From: Jo-Philipp Wich Date: Sun, 28 Apr 2013 14:05:57 +0000 (+0000) Subject: AA: iwinfo: merge r36471 X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2460bbcea0c989878869069924b1c920c585cb08;p=openwrt%2Fsvn-archive%2Fopenwrt.git AA: iwinfo: merge r36471 SVN-Revision: 36472 --- diff --git a/package/iwinfo/Makefile b/package/iwinfo/Makefile index 3758692450..e0090e0be5 100644 --- a/package/iwinfo/Makefile +++ b/package/iwinfo/Makefile @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libiwinfo -PKG_RELEASE:=43 +PKG_RELEASE:=44 PKG_BUILD_DIR := $(BUILD_DIR)/$(PKG_NAME) PKG_CONFIG_DEPENDS := \ diff --git a/package/iwinfo/src/iwinfo_utils.c b/package/iwinfo/src/iwinfo_utils.c index b6760c3486..1a831f3ac1 100644 --- a/package/iwinfo/src/iwinfo_utils.c +++ b/package/iwinfo/src/iwinfo_utils.c @@ -131,7 +131,7 @@ struct iwinfo_hardware_entry * iwinfo_hardware(struct iwinfo_hardware_id *id) { FILE *db; char buf[256] = { 0 }; - static struct iwinfo_hardware_entry e; + static struct iwinfo_hardware_entry e, *rv = NULL; if (!(db = fopen(IWINFO_HARDWARE_FILE, "r"))) return NULL; @@ -161,15 +161,12 @@ struct iwinfo_hardware_entry * iwinfo_hardware(struct iwinfo_hardware_id *id) (e.subsystem_device_id != id->subsystem_device_id)) continue; + rv = &e; break; } fclose(db); - - if (e.device_name[0]) - return &e; - - return NULL; + return rv; } int iwinfo_hardware_id_from_mtd(struct iwinfo_hardware_id *id)