aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-lib.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-10-02 08:45:08 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2006-10-02 08:45:08 -0400
commit59458f40e25915a355d8b1d701425fe9f4f9ea23 (patch)
treef1c9a2934df686e36d75f759ab7313b6f0e0e5f9 /drivers/rtc/rtc-lib.c
parent825f9075d74028d11d7f5932f04e1b5db3022b51 (diff)
parentd834c16516d1ebec4766fc58c059bf01311e6045 (diff)
Merge branch 'master' into gfs2
Diffstat (limited to 'drivers/rtc/rtc-lib.c')
-rw-r--r--drivers/rtc/rtc-lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/rtc/rtc-lib.c b/drivers/rtc/rtc-lib.c
index 9812120f3a7c..ba795a4db1e9 100644
--- a/drivers/rtc/rtc-lib.c
+++ b/drivers/rtc/rtc-lib.c
@@ -94,12 +94,12 @@ EXPORT_SYMBOL(rtc_time_to_tm);
94int rtc_valid_tm(struct rtc_time *tm) 94int rtc_valid_tm(struct rtc_time *tm)
95{ 95{
96 if (tm->tm_year < 70 96 if (tm->tm_year < 70
97 || tm->tm_mon >= 12 97 || ((unsigned)tm->tm_mon) >= 12
98 || tm->tm_mday < 1 98 || tm->tm_mday < 1
99 || tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900) 99 || tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900)
100 || tm->tm_hour >= 24 100 || ((unsigned)tm->tm_hour) >= 24
101 || tm->tm_min >= 60 101 || ((unsigned)tm->tm_min) >= 60
102 || tm->tm_sec >= 60) 102 || ((unsigned)tm->tm_sec) >= 60)
103 return -EINVAL; 103 return -EINVAL;
104 104
105 return 0; 105 return 0;