hwclock: fix sizeof bug (used it on pointer, not array); make --systohc exact
function old new delta hwclock_main 329 428 +99 rtc_adjtime_is_utc 138 134 -4 edir 365 354 -11 read_rtc 39 23 -16 ------------------------------------------------------------------------------ (add/remove: 0/0 grow/shrink: 1/3 up/down: 99/-31) Total: 68 bytes Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
@ -19,7 +19,7 @@ int FAST_FUNC rtc_adjtime_is_utc(void)
|
||||
FILE *f = fopen_for_read(ADJTIME_PATH);
|
||||
|
||||
if (f) {
|
||||
RESERVE_CONFIG_BUFFER(buffer, 128);
|
||||
char buffer[128];
|
||||
|
||||
while (fgets(buffer, sizeof(buffer), f)) {
|
||||
int len = strlen(buffer);
|
||||
@ -35,8 +35,6 @@ int FAST_FUNC rtc_adjtime_is_utc(void)
|
||||
}
|
||||
}
|
||||
fclose(f);
|
||||
|
||||
RELEASE_CONFIG_BUFFER(buffer);
|
||||
}
|
||||
|
||||
return utc;
|
||||
|
Reference in New Issue
Block a user