X-Git-Url: http://pilppa.org/gitweb/?a=blobdiff_plain;f=src_test%2Ftest_w1_datalog_write.cc;h=88d4c5fc0b7d1a8ff8ed8948e33d18236cac9cec;hb=c4d8504b99fa1e354d15b2b91e4e2797f54ba028;hp=d0cd8e9943b1fd62c709c9cde8e5175ba547a288;hpb=dcc5fd94e2ec65898dd8bda440cb0539e1f60373;p=lib1wire.git diff --git a/src_test/test_w1_datalog_write.cc b/src_test/test_w1_datalog_write.cc index d0cd8e9..88d4c5f 100644 --- a/src_test/test_w1_datalog_write.cc +++ b/src_test/test_w1_datalog_write.cc @@ -43,12 +43,13 @@ bool try_parse_long(const char *str, long *result) { } int main(int argc, char** argv) { - list device_list; - int round; - long scan_interval; - long store_interval; - string loc; - W1Device *device; + list device_list; + int round; + long scan_interval; + long store_interval; + string loc; + W1Device *device; + list::iterator iter; // default values than can be overwritten with parameters loc = "/tmp/w1data"; @@ -74,8 +75,8 @@ int main(int argc, char** argv) { if (device_list.size() > 0) { while(1) { round++; - for(list::iterator list_iter = device_list.begin(); list_iter != device_list.end(); list_iter++) { - device = (W1Device *)*list_iter; + for(iter = device_list.begin(); iter != device_list.end(); iter++) { + device = (W1Device *)*iter; device->printout(); sleep(1); if (round >= store_interval) {