diff options
author | Zeranoe <zeranoe@gmail.com> | 2021-02-24 01:43:33 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 07:43:33 +0100 |
commit | d86ffa2cb6aec32e926e12b965ae205fd17de4f2 (patch) | |
tree | f69837ec979445fb9aabc5f07c0b55d9821b462e /camlibs/spca50x | |
parent | a9bf8e47514537c1ce9ab149c811249b8f9e6951 (diff) | |
download | libgphoto2-d86ffa2cb6aec32e926e12b965ae205fd17de4f2.tar.gz |
Fix byte swap calls (#626)
gphoto2-endian.h provides shims for the standard byte swap macros, so
using the standard name is preferred.
Diffstat (limited to 'camlibs/spca50x')
-rw-r--r-- | camlibs/spca50x/spca50x-flash.c | 8 | ||||
-rw-r--r-- | camlibs/spca50x/spca50x-sdram.c | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/camlibs/spca50x/spca50x-flash.c b/camlibs/spca50x/spca50x-flash.c index 18be920c7..210482e98 100644 --- a/camlibs/spca50x/spca50x-flash.c +++ b/camlibs/spca50x/spca50x-flash.c @@ -149,13 +149,13 @@ spca50x_flash_get_TOC(CameraPrivateLibrary *pl, int *filecount) (char*)&n_toc_entries, 0x02)); /* Each file gets two toc entries, one for the image, one for the thumbnail */ - LE16TOH (n_toc_entries); + le16toh (n_toc_entries); *filecount = n_toc_entries/2; } else { CHECK (gp_port_usb_msg_read (pl->gpdev, 0x54, 0x0000, 0x0000, (char*)&n_toc_entries, 0x02)); - LE16TOH (n_toc_entries); + le16toh (n_toc_entries); *filecount = n_toc_entries; } /* If empty, return now */ @@ -225,13 +225,13 @@ spca50x_flash_get_filecount (CameraPrivateLibrary *pl, int *filecount) (char*)&response, 0x02)); /* Each file gets two toc entries, one for the image, one for the thumbnail */ - LE16TOH (response); + le16toh (response); *filecount = response/2; } else { CHECK (gp_port_usb_msg_read (pl->gpdev, 0x54, 0x0000, 0x0000, (char*)&response, 0x02)); - LE16TOH (response); + le16toh (response); *filecount = response; } } diff --git a/camlibs/spca50x/spca50x-sdram.c b/camlibs/spca50x/spca50x-sdram.c index 6b94534a7..dc6c96d53 100644 --- a/camlibs/spca50x/spca50x-sdram.c +++ b/camlibs/spca50x/spca50x-sdram.c @@ -123,7 +123,7 @@ spca50x_sdram_get_file_count_and_fat_count (CameraPrivateLibrary * lib, CHECK (gp_port_usb_msg_read (lib->gpdev, 0, 0, 0xe15, (char *) & lib->num_files_on_sdram, 1)); - LE32TOH (lib->num_files_on_sdram); + le32toh (lib->num_files_on_sdram); /* get fatscount */ CHECK (gp_port_usb_msg_write |