about summary refs log tree commit diff
path: root/editor/pamcomp.c
diff options
context:
space:
mode:
authorgiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-07-30 23:27:04 +0000
committergiraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8>2011-07-30 23:27:04 +0000
commit0bbc0d23d5ed7bdde9045a784525d141aa98d286 (patch)
treeecfbf6e4fde0946d1d5807ecdd99f3c4bb1529cd /editor/pamcomp.c
parent3ec258b0b7246c147e03ee8d41a513bdbee23783 (diff)
downloadnetpbm-mirror-0bbc0d23d5ed7bdde9045a784525d141aa98d286.tar.gz
netpbm-mirror-0bbc0d23d5ed7bdde9045a784525d141aa98d286.tar.xz
netpbm-mirror-0bbc0d23d5ed7bdde9045a784525d141aa98d286.zip
cleanup
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1524 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pamcomp.c')
-rw-r--r--editor/pamcomp.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/editor/pamcomp.c b/editor/pamcomp.c
index 60304891..afdf4451 100644
--- a/editor/pamcomp.c
+++ b/editor/pamcomp.c
@@ -223,14 +223,14 @@ commonTupletype(const char * const tupletypeA,
                 char *       const tupletypeOut,
                 unsigned int const size) {
 
-    if (strncmp(tupletypeA, "RGB", 3) == 0 ||
-        strncmp(tupletypeB, "RGB", 3) == 0)
+    if (strneq(tupletypeA, "RGB", 3) ||
+        strneq(tupletypeB, "RGB", 3))
         strncpy(tupletypeOut, "RGB", size);
-    else if (strncmp(tupletypeA, "GRAYSCALE", 9) == 0 ||
-        strncmp(tupletypeB, "GRAYSCALE", 9) == 0)
+    else if (strneq(tupletypeA, "GRAYSCALE", 9) ||
+             strneq(tupletypeB, "GRAYSCALE", 9))
         strncpy(tupletypeOut, "GRAYSCALE", size);
-    else if (strncmp(tupletypeA, "BLACKANDWHITE", 13) == 0 ||
-        strncmp(tupletypeB, "BLACKANDWHITE", 13) == 0)
+    else if (strneq(tupletypeA, "BLACKANDWHITE", 13) ||
+             strneq(tupletypeB, "BLACKANDWHITE", 13))
         strncpy(tupletypeOut, "BLACKANDWHITE", size);
     else
         /* Results are undefined for this case, so we do a hail Mary. */
@@ -503,7 +503,7 @@ adaptRowToOutputFormat(struct pam * const inpamP,
 -----------------------------------------------------------------------------*/
     pnm_scaletuplerow(inpamP, tuplerow, tuplerow, outpamP->maxval);
 
-    if (strncmp(outpamP->tuple_type, "RGB", 3) == 0)
+    if (strneq(outpamP->tuple_type, "RGB", 3))
         pnm_makerowrgb(inpamP, tuplerow);
 }