fix: uninitialized var

used -Wall to find
warning: 'dd' is used uninitialized in this function [-Wuninitialized]
This commit is contained in:
Bee Red
2014-02-05 01:56:10 +01:00
parent 08170378a0
commit b54970344d
+2 -2
View File
@@ -146,8 +146,8 @@ eb_day_to_str(unsigned char day, char *tgt)
int dd;
if (dd >= 0x00 && dd <= 0x06) {
eb_bcd_to_int(day, &dd);
sprintf(tgt, "%s", days[day]);
eb_bcd_to_int(day, &day);
sprintf(tgt, "%s", days[dd]);
} else {
return -1;
}