Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 37666
b: refs/heads/master
c: db621f1
h: refs/heads/master
v: v3
  • Loading branch information
David Brownell authored and Linus Torvalds committed Oct 1, 2006
1 parent ccd71b4 commit 2c71e0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 818a8674b0388d90e33a5d1b13946b40dda7032a
refs/heads/master: db621f174d2c017d960089ea8cbc91c0763f1069
8 changes: 4 additions & 4 deletions trunk/drivers/rtc/rtc-lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ EXPORT_SYMBOL(rtc_time_to_tm);
int rtc_valid_tm(struct rtc_time *tm)
{
if (tm->tm_year < 70
|| tm->tm_mon >= 12
|| ((unsigned)tm->tm_mon) >= 12
|| tm->tm_mday < 1
|| tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900)
|| tm->tm_hour >= 24
|| tm->tm_min >= 60
|| tm->tm_sec >= 60)
|| ((unsigned)tm->tm_hour) >= 24
|| ((unsigned)tm->tm_min) >= 60
|| ((unsigned)tm->tm_sec) >= 60)
return -EINVAL;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/rtc/rtc-proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static int rtc_proc_show(struct seq_file *seq, void *offset)
seq_printf(seq, "%02d-", alrm.time.tm_mon + 1);
else
seq_printf(seq, "**-");
if ((unsigned int)alrm.time.tm_mday <= 31)
if (alrm.time.tm_mday && (unsigned int)alrm.time.tm_mday <= 31)
seq_printf(seq, "%02d\n", alrm.time.tm_mday);
else
seq_printf(seq, "**\n");
Expand Down

0 comments on commit 2c71e0b

Please sign in to comment.