File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -239,7 +239,7 @@ static char *prettify_algorithm(u8 *data, size_t length)
239239static char * prettify_date (u8 * data , size_t length )
240240{
241241 if (data != NULL && length == 4 ) {
242- time_t time = (data [0 ] << 24 ) + ( data [1 ] << 16 ) + ( data [2 ] << 8 ) + data [3 ];
242+ time_t time = (time_t ) ( data [0 ] << 24 | data [1 ] << 16 | data [2 ] << 8 | data [3 ]) ;
243243 struct tm * tp ;
244244 static char result [64 ]; /* large enough */
245245
@@ -312,9 +312,9 @@ static char *prettify_serialnumber(u8 *data, size_t length)
312312{
313313 if (data != NULL && length >= 4 ) {
314314 static char result [15 ]; /* large enough for even 2*3 digits + separator */
315- unsigned int serial = (data [0 ] << 24 ) + ( data [1 ] << 16 ) + ( data [2 ] << 8 ) + data [3 ];
315+ unsigned long serial = (unsigned long ) ( data [0 ] << 24 | data [1 ] << 16 | data [2 ] << 8 | data [3 ]) ;
316316
317- sprintf (result , "%08X " , serial );
317+ sprintf (result , "%08lX " , serial );
318318 return result ;
319319 }
320320 return NULL ;
You can’t perform that action at this time.
0 commit comments