- Timestamp:
- 10/03/13 01:44:25 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ksyslog/trunk/ksyslog.h
r246 r249 131 131 ksyslog_month_num(const char *month) 132 132 { 133 if (!memcmp(month, "Jan", 3)) 133 const u32 m = *((u32 *)month); 134 135 if (m == *((u32 *)"Jan")) 134 136 return 1; 135 else if ( !memcmp(month, "Feb", 3))137 else if (m == *((u32 *)"Feb")) 136 138 return 2; 137 else if ( !memcmp(month, "Mar", 3))139 else if (m == *((u32 *)"Mar")) 138 140 return 3; 139 else if ( !memcmp(month, "Apr", 3))141 else if (m == *((u32 *)"Apr")) 140 142 return 4; 141 else if ( !memcmp(month, "May", 3))143 else if (m == *((u32 *)"May")) 142 144 return 5; 143 else if ( !memcmp(month, "Jun", 3))145 else if (m == *((u32 *)"Jun")) 144 146 return 6; 145 else if ( !memcmp(month, "Jul", 3))147 else if (m == *((u32 *)"Jul")) 146 148 return 7; 147 else if ( !memcmp(month, "Aug", 3))149 else if (m == *((u32 *)"Aug")) 148 150 return 8; 149 else if ( !memcmp(month, "Sep", 3))151 else if (m == *((u32 *)"Sep")) 150 152 return 9; 151 else if ( !memcmp(month, "Oct", 3))153 else if (m == *((u32 *)"Oct")) 152 154 return 10; 153 else if ( !memcmp(month, "Nov", 3))155 else if (m == *((u32 *)"Nov")) 154 156 return 11; 155 else if ( !memcmp(month, "Dec", 3))157 else if (m == *((u32 *)"Dec")) 156 158 return 12; 157 else 158 return 0; 159 return 0; 159 160 } 160 161
Note: See TracChangeset
for help on using the changeset viewer.