From a9c17f6805e91cbc8011760367cdbe6c000a5fc2 Mon Sep 17 00:00:00 2001 From: Dan Fandrich Date: Tue, 18 Nov 2008 01:42:58 -0800 Subject: [PATCH] Internalized some strings into a const struct to make it smaller and reduce the amount of run-time linking required --- libexif/exif-entry.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libexif/exif-entry.c b/libexif/exif-entry.c index f620af4..c81137d 100644 --- a/libexif/exif-entry.c +++ b/libexif/exif-entry.c @@ -569,7 +569,7 @@ exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen) double d; ExifEntry *entry; static const struct { - const char *label; + char label[5]; char major, minor; } versions[] = { {"0110", 1, 1}, @@ -578,7 +578,7 @@ exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen) {"0210", 2, 1}, {"0220", 2, 2}, {"0221", 2, 21}, - {NULL , 0, 0} + {"" , 0, 0} }; /* FIXME: This belongs to somewhere else. */ @@ -668,7 +668,7 @@ exif_entry_get_value (ExifEntry *e, char *val, unsigned int maxlen) CF (e, EXIF_FORMAT_UNDEFINED, val, maxlen); CC (e, 4, val, maxlen); strncpy (val, _("Unknown Exif Version"), maxlen); - for (i = 0; versions[i].label; i++) { + for (i = 0; *versions[i].label; i++) { if (!memcmp (e->data, versions[i].label, 4)) { snprintf (val, maxlen, _("Exif Version %d.%d"), -- 2.7.4