From: Jan Patera Date: Wed, 12 May 2004 12:03:47 +0000 (+0200) Subject: 2004-05-12 Jan Patera X-Git-Tag: libexif-0_6_21-release~769 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98522311211069d79d9946db390138db658f920b;p=platform%2Fupstream%2Flibexif.git 2004-05-12 Jan Patera * libexif/exif-utils.h: definition of MIN * libexif/pentax/mnote-pentax-entry.c: min -> MIN (found by Serge Droz ) --- diff --git a/ChangeLog b/ChangeLog index 4db7a9e..91284e5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-05-12 Jan Patera + + * libexif/exif-utils.h: definition of MIN + * libexif/pentax/mnote-pentax-entry.c: min -> MIN + (found by Serge Droz ) + 2004-05-11 Jan Patera * libjpeg/jpeg-data.c: memory leak in jpeg_data_set_exif_data, diff --git a/libexif/exif-utils.h b/libexif/exif-utils.h index a07ad3b..33a469f 100644 --- a/libexif/exif-utils.h +++ b/libexif/exif-utils.h @@ -59,6 +59,9 @@ void exif_set_rational (unsigned char *b, ExifByteOrder order, void exif_set_srational (unsigned char *b, ExifByteOrder order, ExifSRational value); +#undef MIN +#define MIN(a, b) (((a) < (b)) ? (a) : (b)) + /* For compatibility with older versions */ #define EXIF_TAG_SUBSEC_TIME EXIF_TAG_SUB_SEC_TIME diff --git a/libexif/pentax/mnote-pentax-entry.c b/libexif/pentax/mnote-pentax-entry.c index 02b18f2..ca4f23c 100644 --- a/libexif/pentax/mnote-pentax-entry.c +++ b/libexif/pentax/mnote-pentax-entry.c @@ -187,7 +187,7 @@ mnote_pentax_entry_get_value (MnotePentaxEntry *entry, default: switch (entry->format) { case EXIF_FORMAT_ASCII: - strncpy (val, entry->data, min(maxlen, entry->components)); + strncpy (val, entry->data, MIN(maxlen, entry->components)); break; case EXIF_FORMAT_SHORT: vs = exif_get_short (entry->data, entry->order);