]> pilppa.org Git - lib1wire.git/blobdiff - src/Date.cc
Initial support for reading and writing device specific config data.
[lib1wire.git] / src / Date.cc
index b8b57140d2a4ea3dbd9d2f4c086d55d6a47b449c..8c03c5bd661e6ed7a5c371037ef4e0923b268af2 100644 (file)
@@ -57,7 +57,7 @@ bool Date::is_leap_year() {
 
        ret_val = false;
        if ((year % 4 == 0) &&
-           (year % 400 == 0) || (year % 100 != 0)) {
+           ((year % 400 == 0) || (year % 100 != 0))) {
                ret_val = true;
        }
        return ret_val;
@@ -141,7 +141,6 @@ string Date::to_string() {
        char    buffer[30];
        string  ret_val;
 
-       int n, a=5, b=3;
        sprintf(buffer, "%016d%02d%02d%02d%02d%02d", year, month, day, hour, min, sec);
        ret_val = buffer;
        return ret_val;