Skip to content

Commit 6370f13

Browse files
committed
ext/exif: make php_tiff_bytes_per_format and other globals const
1 parent d89942e commit 6370f13

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

ext/exif/exif.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,10 +230,10 @@ static size_t php_strnlen(char* str, size_t maxlen) {
230230
/* }}} */
231231

232232
/* {{{ error messages */
233-
static const char * EXIF_ERROR_FILEEOF = "Unexpected end of file reached";
234-
static const char * EXIF_ERROR_CORRUPT = "File structure corrupted";
235-
static const char * EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached";
236-
static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
233+
static const char *const EXIF_ERROR_FILEEOF = "Unexpected end of file reached";
234+
static const char *const EXIF_ERROR_CORRUPT = "File structure corrupted";
235+
static const char *const EXIF_ERROR_THUMBEOF = "Thumbnail goes IFD boundary or end of file reached";
236+
static const char *const EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined file section";
237237

238238
#define EXIF_ERRLOG_FILEEOF(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_FILEEOF);
239239
#define EXIF_ERRLOG_CORRUPT(ImageInfo) exif_error_docref(NULL EXIFERR_CC, ImageInfo, E_WARNING, "%s", EXIF_ERROR_CORRUPT);
@@ -244,7 +244,7 @@ static const char * EXIF_ERROR_FSREALLOC = "Illegal reallocating of undefined fi
244244
/* {{{ format description defines
245245
Describes format descriptor
246246
*/
247-
static int php_tiff_bytes_per_format[] = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 1};
247+
static const int php_tiff_bytes_per_format[] = {0, 1, 1, 2, 4, 8, 1, 1, 2, 4, 8, 4, 8, 1};
248248
#define NUM_FORMATS 13
249249

250250
#define TAG_FMT_BYTE 1

0 commit comments

Comments
 (0)