|
|
|
|
153
|
( num_menu_items * sizeof ( (*menu)->items[0] ) ) );
|
153
|
( num_menu_items * sizeof ( (*menu)->items[0] ) ) );
|
154
|
memcpy ( raw_menu_item, raw_menu, raw_menu_len );
|
154
|
memcpy ( raw_menu_item, raw_menu, raw_menu_len );
|
155
|
for ( i = 0 ; i < num_menu_items ; i++ ) {
|
155
|
for ( i = 0 ; i < num_menu_items ; i++ ) {
|
156
|
- (*menu)->items[i].type = ntohs ( raw_menu_item->type );
|
|
|
|
|
156
|
+ (*menu)->items[i].type = le16_to_cpu ( raw_menu_item->type );
|
157
|
(*menu)->items[i].desc = raw_menu_item->desc;
|
157
|
(*menu)->items[i].desc = raw_menu_item->desc;
|
158
|
/* Set type to 0; this ensures that the description
|
158
|
/* Set type to 0; this ensures that the description
|
159
|
* for the previous menu item is NUL-terminated.
|
159
|
* for the previous menu item is NUL-terminated.
|