Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 158513
b: refs/heads/master
c: 02c24fa
h: refs/heads/master
i:
  158511: 093d66a
v: v3
  • Loading branch information
Tejun Heo authored and Jeff Garzik committed Sep 9, 2009
1 parent 55dbbe6 commit a90f0b0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 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: bd30add88cea831dfb854d564478f09ee66206b5
refs/heads/master: 02c24fa87724bb3af969463cd74dc3b3feb24740
5 changes: 3 additions & 2 deletions trunk/drivers/firmware/dmi_scan.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,7 @@ int dmi_get_year(int field)
{
int year;
const char *s = dmi_get_system_info(field);
char *e;

if (!s)
return -1;
Expand All @@ -587,8 +588,8 @@ int dmi_get_year(int field)
return 0;

s += 1;
year = simple_strtoul(s, NULL, 0);
if (year && year < 100) { /* 2-digit year */
year = simple_strtoul(s, &e, 10);
if (s != e && year < 100) { /* 2-digit year */
year += 1900;
if (year < 1996) /* no dates < spec 1.0 */
year += 100;
Expand Down

0 comments on commit a90f0b0

Please sign in to comment.