From 0bbc0d23d5ed7bdde9045a784525d141aa98d286 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 30 Jul 2011 23:27:04 +0000 Subject: cleanup git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@1524 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- editor/pamcomp.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'editor/pamcomp.c') 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); } -- cgit 1.4.1