Commit 3b777a79 authored by Philippe Mathieu-Daudé's avatar Philippe Mathieu-Daudé Committed by Laurent Vivier
Browse files

hw/nvram/fw_cfg: Use the ldst API



The load/store API eases code review.

Reviewed-by: default avatarLaszlo Ersek <lersek@redhat.com>
Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Message-Id: <20190309181920.30553-3-philmd@redhat.com>
Signed-off-by: default avatarLaurent Vivier <laurent@vivier.eu>
parent 94530926
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -85,7 +85,7 @@ static char *read_splashfile(char *filename, gsize *file_sizep,
    }

    /* check magic ID */
    filehead = ((content[0] & 0xff) + (content[1] << 8)) & 0xffff;
    filehead = lduw_le_p(content);
    if (filehead == 0xd8ff) {
        file_type = JPG_FILE;
    } else if (filehead == 0x4d42) {
@@ -96,7 +96,7 @@ static char *read_splashfile(char *filename, gsize *file_sizep,

    /* check BMP bpp */
    if (file_type == BMP_FILE) {
        bmp_bpp = (content[28] + (content[29] << 8)) & 0xffff;
        bmp_bpp = lduw_le_p(&content[28]);
        if (bmp_bpp != 24) {
            goto error;
        }