@@ -365,19 +365,19 @@ ean2isn(ean13 ean, bool errorOK, ean13 *result, enum isn_type accept)
365365 * -- aux = '0' ; /* fill the remaining EAN13 with '0' */
366366
367367 /* find out the data type: */
368- if (! strncmp ("978" , buf , 3 ))
368+ if (strncmp ("978" , buf , 3 ) == 0 )
369369 { /* ISBN */
370370 type = ISBN ;
371371 }
372- else if (! strncmp ("977" , buf , 3 ))
372+ else if (strncmp ("977" , buf , 3 ) == 0 )
373373 { /* ISSN */
374374 type = ISSN ;
375375 }
376- else if (! strncmp ("9790" , buf , 4 ))
376+ else if (strncmp ("9790" , buf , 4 ) == 0 )
377377 { /* ISMN */
378378 type = ISMN ;
379379 }
380- else if (! strncmp ("979" , buf , 3 ))
380+ else if (strncmp ("979" , buf , 3 ) == 0 )
381381 { /* ISBN-13 */
382382 type = ISBN ;
383383 }
@@ -570,28 +570,28 @@ ean2string(ean13 ean, bool errorOK, char *result, bool shortType)
570570 }
571571
572572 /* find out what type of hyphenation is needed: */
573- if (! strncmp ("978-" , result , search ))
573+ if (strncmp ("978-" , result , search ) == 0 )
574574 { /* ISBN -13 978-range */
575575 /* The string should be in this form: 978-??000000000-0" */
576576 type = ISBN ;
577577 TABLE = ISBN_range ;
578578 TABLE_index = ISBN_index ;
579579 }
580- else if (! strncmp ("977-" , result , search ))
580+ else if (strncmp ("977-" , result , search ) == 0 )
581581 { /* ISSN */
582582 /* The string should be in this form: 977-??000000000-0" */
583583 type = ISSN ;
584584 TABLE = ISSN_range ;
585585 TABLE_index = ISSN_index ;
586586 }
587- else if (! strncmp ("979-0" , result , search + 1 ))
587+ else if (strncmp ("979-0" , result , search + 1 ) == 0 )
588588 { /* ISMN */
589589 /* The string should be in this form: 979-0?000000000-0" */
590590 type = ISMN ;
591591 TABLE = ISMN_range ;
592592 TABLE_index = ISMN_index ;
593593 }
594- else if (! strncmp ("979-" , result , search ))
594+ else if (strncmp ("979-" , result , search ) == 0 )
595595 { /* ISBN-13 979-range */
596596 /* The string should be in this form: 979-??000000000-0" */
597597 type = ISBN ;
@@ -813,13 +813,13 @@ string2ean(const char *str, bool errorOK, ean13 *result,
813813 /* now get the subtype of EAN13: */
814814 if (buf [3 ] == '0' )
815815 type = UPC ;
816- else if (! strncmp ("977" , buf + 3 , 3 ))
816+ else if (strncmp ("977" , buf + 3 , 3 ) == 0 )
817817 type = ISSN ;
818- else if (! strncmp ("978" , buf + 3 , 3 ))
818+ else if (strncmp ("978" , buf + 3 , 3 ) == 0 )
819819 type = ISBN ;
820- else if (! strncmp ("9790" , buf + 3 , 4 ))
820+ else if (strncmp ("9790" , buf + 3 , 4 ) == 0 )
821821 type = ISMN ;
822- else if (! strncmp ("979" , buf + 3 , 3 ))
822+ else if (strncmp ("979" , buf + 3 , 3 ) == 0 )
823823 type = ISBN ;
824824 if (accept != EAN13 && accept != ANY && type != accept )
825825 goto eanwrongtype ;
0 commit comments