X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src%2FFactory.cc;h=c8dc6949f957fe6f1c71b7e8f15338ad26d32eba;hb=d01194ab9275bc97176071089edc2781bb4de51b;hp=1ce585b003c23b8e42093696ae46ca4f4c6918f0;hpb=56242039f27dc5d36117b8d513731c7a9009d4b1;p=lib1wire.git diff --git a/src/Factory.cc b/src/Factory.cc index 1ce585b..c8dc694 100644 --- a/src/Factory.cc +++ b/src/Factory.cc @@ -42,6 +42,7 @@ W1Device *Factory::get_device(int family_code, dirent *direntry_param) { W1Device *ret_val; DeviceConfig *config; + string type; ret_val = NULL; switch(family_code) { @@ -62,7 +63,6 @@ W1Device *Factory::get_device(int family_code, config = get_device_config(device_id); if (config != NULL) { // if not, create default device config - string type; type = config->get_cfg_value(DEVICE_CONFIG_VALUE_KEY__TYPE); if (type.empty() == true) { type = ret_val->get_device_type();