about summary refs log tree commit diff
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-06-08 20:06:39 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2022-06-08 20:06:39 +0000
commit88891c17336b2f7d6ea3f720eaaac40940a57d1f (patch)
tree9e0dcef2b332eeec95dae54052143894c5afdea2
parenta3c89538635b2141c30b1261adc8e1a1f4484ccf (diff)
downloadnetpbm-mirror-88891c17336b2f7d6ea3f720eaaac40940a57d1f.tar.gz
netpbm-mirror-88891c17336b2f7d6ea3f720eaaac40940a57d1f.tar.xz
netpbm-mirror-88891c17336b2f7d6ea3f720eaaac40940a57d1f.zip
Replace vestigial uses of MEMEQ macro with memeq inline function
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4351 9d0c8265-081b-0410-96cb-a4ca84ce46f8
-rw-r--r--converter/other/exif.c6
-rw-r--r--converter/other/winicontopam.c2
-rw-r--r--lib/util/nstring.h2
3 files changed, 4 insertions, 6 deletions
diff --git a/converter/other/exif.c b/converter/other/exif.c
index 1bfe4b2b..87236dc7 100644
--- a/converter/other/exif.c
+++ b/converter/other/exif.c
@@ -533,7 +533,7 @@ processDirEntry(const unsigned char *  const dirEntry,
         for (end = byteCount; end > 0 && value[end] == ' '; --end);
 
         /* Skip "ASCII" if it is there */
-        if (end >= 5 && MEMEQ(value, "ASCII", 5))
+        if (end >= 5 && memeq(value, "ASCII", 5))
             cursor = 5;
         else
             cursor = 0;
@@ -860,12 +860,12 @@ exif_parse(const unsigned char * const exifData,
     if (wantTagTrace)
         fprintf(stderr, "Exif header %d bytes long\n",length);
 
-    if (MEMEQ(exifData + 0, "II" , 2)) {
+    if (memeq(exifData + 0, "II" , 2)) {
         if (wantTagTrace) 
             fprintf(stderr, "Exif header in Intel order\n");
         byteOrder = NORMAL;
     } else {
-        if (MEMEQ(exifData + 0, "MM", 2)) {
+        if (memeq(exifData + 0, "MM", 2)) {
             if (wantTagTrace) 
                 fprintf(stderr, "Exif header in Motorola order\n");
             byteOrder = MOTOROLA;
diff --git a/converter/other/winicontopam.c b/converter/other/winicontopam.c
index f6f89e11..bb39bf60 100644
--- a/converter/other/winicontopam.c
+++ b/converter/other/winicontopam.c
@@ -1273,7 +1273,7 @@ convertImage(struct File *         const icoP,
 
     image = readImage(icoP, dirEntryP);
 
-    if (MEMEQ(image, pngSignature, sizeof (pngSignature)))
+    if (memeq(image, pngSignature, sizeof (pngSignature)))
         convertPng(image, ofP, dirEntryP);
     else
         convertBmp(image, ofP, dirEntryP, needHeaderDump, wantAndMaskPlane);
diff --git a/lib/util/nstring.h b/lib/util/nstring.h
index e1ef0747..677e24cb 100644
--- a/lib/util/nstring.h
+++ b/lib/util/nstring.h
@@ -30,8 +30,6 @@ extern "C" {
 #define STRSEQ(A, B) \
 	(strneq((A), (B), sizeof(A)))
 
-#define MEMEQ(a,b,c) (memcmp(a, b, c) == 0)
-
 #define MEMSEQ(a,b) (memeq(a, b, sizeof(*(a))))
 
 #define MEMSSET(a,b) (memset(a, b, sizeof(*(a))))