From: Marcus M. <mar...@us...> - 2006-09-27 09:34:01
|
Update of /cvsroot/libexif/libexif/libexif In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv4168 Modified Files: exif-loader.c Log Message: min -> MAX, max -> MAX Index: exif-loader.c =================================================================== RCS file: /cvsroot/libexif/libexif/libexif/exif-loader.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -p -d -r1.22 -r1.23 --- exif-loader.c 19 Sep 2006 05:39:10 -0000 1.22 +++ exif-loader.c 27 Sep 2006 09:33:58 -0000 1.23 @@ -40,6 +40,9 @@ #undef JPEG_MARKER_COM #define JPEG_MARKER_COM 0xfe +#undef MAX +#define MAX(a, b) (((a) > (b)) ? (a) : (b)) + typedef enum { EL_READ = 0, EL_READ_SIZE_BYTE_24, @@ -262,7 +265,7 @@ exif_loader_write (ExifLoader *eld, unsi default: switch (eld->b[i]) { case JPEG_MARKER_APP1: - if (!memcmp (eld->b + i + 3, ExifHeader, min(sizeof (ExifHeader), max(0, sizeof (eld->b) - i - 3)))) { + if (!memcmp (eld->b + i + 3, ExifHeader, MIN(sizeof (ExifHeader), MAX(0, sizeof (eld->b) - i - 3)))) { eld->data_format = EL_DATA_FORMAT_EXIF; } else { eld->data_format = EL_DATA_FORMAT_JPEG; /* Probably JFIF - keep searching for APP1 EXIF*/ |