]> pilppa.org Git - lib1wire.git/blobdiff - src_test/test_w1_datalog_write.cc
cleanups, renamed get_*_values functions to get_*_data
[lib1wire.git] / src_test / test_w1_datalog_write.cc
index d0cd8e9943b1fd62c709c9cde8e5175ba547a288..88d4c5fc0b7d1a8ff8ed8948e33d18236cac9cec 100644 (file)
@@ -43,12 +43,13 @@ bool try_parse_long(const char *str, long *result) {
 }
 
 int main(int argc, char** argv) {
-       list<W1Device *>        device_list;
-       int                     round;
-       long                    scan_interval;
-       long                    store_interval;
-       string                  loc;
-       W1Device                *device;
+       list<W1Device *>                device_list;
+       int                             round;
+       long                            scan_interval;
+       long                            store_interval;
+       string                          loc;
+       W1Device                        *device;
+       list<W1Device *>::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<W1Device *>::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) {