diff options
-rw-r--r-- | board/toradex/common/board.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/board/toradex/common/board.c b/board/toradex/common/board.c index 3502d085c0f..934266ef6aa 100644 --- a/board/toradex/common/board.c +++ b/board/toradex/common/board.c @@ -736,12 +736,11 @@ void get_board_serial(struct tag_serialnr *serialnr) array[i--] = serial % 10; serial /= 10; } - serial = 0; - for (i = 0; i < 8; i++) { - serial += array[i]; + serial = array[0]; + for (i = 1; i < 8; i++) { serial *= 16; + serial += array[i]; } - serial /= 16; } serialnr->low = serial; |