]> pilppa.org Git - lib1wire.git/blobdiff - src_test/test_w1_datalog_read.cc
configuration data related changes
[lib1wire.git] / src_test / test_w1_datalog_read.cc
index f833af5caeda0346ad3600d893f3baee52b28c10..064831b4bc8c71432bd57b1e87294792e73effd3 100644 (file)
@@ -24,29 +24,6 @@ using namespace std;
 using namespace plp;
 using namespace w1;
 
-bool try_parse_long(const char *str, long *result) {
-       int     new_result;
-       char    *endptr;
-       bool    ret_val;
-
-       ret_val         = false;
-       errno           = 0;
-       new_result      = strtol(str, &endptr, 10);
-       if (errno != 0) {
-               log_error("invalid input %s, could not convert to integer.\n", str);
-       }
-       else {
-               if (endptr == str) {
-                       log_error("invalid input %s, could not convert to integer.\n", str);
-               }
-               else {
-                       *result = new_result;
-                       ret_val = true;
-               }
-       }
-       return ret_val;
-}
-
 int main(int argc, char** argv) {
        string                          loc;
        Data                            *fdata;