Skip to content

Commit 0e6eeaf

Browse files
committed
Add const qualifiers
1 parent a56c7b2 commit 0e6eeaf

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

extract-xiso.c

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -457,7 +457,7 @@ typedef int64_t file_time_t;
457457
#define XGD2_ALT_LSEEK_OFFSET 0x89D80000ul
458458
#define LSEEK_OFFSETS_LEN 5
459459
/* The offsets should be in ascending order, otherwise we could get a seek error before checking the correct one */
460-
xoff_t lseek_offsets[LSEEK_OFFSETS_LEN] = {START_LSEEK_OFFSET, XGD3_LSEEK_OFFSET, XGD2_LSEEK_OFFSET, XGD1_LSEEK_OFFSET, XGD2_ALT_LSEEK_OFFSET};
460+
const xoff_t lseek_offsets[LSEEK_OFFSETS_LEN] = {START_LSEEK_OFFSET, XGD3_LSEEK_OFFSET, XGD2_LSEEK_OFFSET, XGD1_LSEEK_OFFSET, XGD2_ALT_LSEEK_OFFSET};
461461

462462
#define XISO_HEADER_DATA "MICROSOFT*XBOX*MEDIA"
463463
#define XISO_HEADER_DATA_LENGTH 20
@@ -512,8 +512,8 @@ xoff_t lseek_offsets[LSEEK_OFFSETS_LEN] = {START_LSEEK_OFFSET, XGD3_LSEEK_OFFSET
512512

513513
#define GETOPT_STRING "c:d:Dhlmp:qQrsvx"
514514

515-
char* cp1252_locales[] = { ".1252" /* Windows */, "C.CP1252", "en_US.CP1252", "de_DE.CP1252", NULL };
516-
char* utf8_locales[] = { ".UTF-8" /* Windows */, "C.UTF-8", "en_US.UTF-8", NULL };
515+
const char* const cp1252_locales[] = { ".1252" /* Windows */, "C.CP1252", "en_US.CP1252", "de_DE.CP1252", NULL };
516+
const char* const utf8_locales[] = { ".UTF-8" /* Windows */, "C.UTF-8", "en_US.UTF-8", NULL };
517517

518518

519519
typedef enum avl_skew { k_no_skew , k_left_skew , k_right_skew } avl_skew;
@@ -649,13 +649,15 @@ static xoff_t s_xbox_disc_lseek = 0;
649649

650650

651651
int main( int argc, char **argv ) {
652-
struct stat sb;
653-
create_list *create = NULL, *p, *q;
654-
int i, fd, opt_char, err = 0, isos = 0;
655-
bool extract = true, rewrite = false, x_seen = false, delete = false, optimized;
656-
ptrdiff_t diff;
657-
char *path = NULL, *buf = NULL, *new_iso_path = NULL, *locale = NULL, **locale_arr = NULL;
658-
char tag[XISO_OPTIMIZED_TAG_LENGTH + 1];
652+
struct stat sb;
653+
create_list *create = NULL, *p, *q;
654+
int i, fd, opt_char, err = 0, isos = 0;
655+
bool extract = true, rewrite = false, x_seen = false, delete = false, optimized;
656+
ptrdiff_t diff;
657+
char *path = NULL, *buf = NULL, *new_iso_path = NULL;
658+
const char *locale = NULL;
659+
const char* const *locale_arr = NULL;
660+
char tag[XISO_OPTIMIZED_TAG_LENGTH + 1];
659661

660662
if (argc < 2) usage_and_exit(1);
661663

0 commit comments

Comments
 (0)