From: Victor Wagner Date: Thu, 28 Apr 2016 04:29:42 +0000 (+0300) Subject: Fix couple of errors from coverity scan X-Git-Tag: REL_0_95~3 X-Git-Url: http://wagner.pp.ru/gitweb/?a=commitdiff_plain;h=35d0d9bcbb33b64c3cfd83548fc9fc1cbdb5295e;p=oss%2Fcatdoc.git Fix couple of errors from coverity scan --- diff --git a/src/ole.c b/src/ole.c index e131a0d..819ad33 100644 --- a/src/ole.c +++ b/src/ole.c @@ -499,8 +499,8 @@ size_t ole_read(void *ptr, size_t size, size_t nmemb, FILE *stream) { int readbytes; blockNumber++; newoffset = calcFileBlockOffset(e,blockNumber); - if (newoffset != e->file_offset); - fseek(e->file, e->file_offset=newoffset , SEEK_SET); + if (newoffset != e->file_offset) + fseek(e->file, e->file_offset=newoffset , SEEK_SET); readbytes=fread(cptr+rread, 1, min(llen-rread, ssize), e->file); rread +=readbytes; e->file_offset +=readbytes; diff --git a/src/substmap.c b/src/substmap.c index ac9b934..6e28924 100644 --- a/src/substmap.c +++ b/src/substmap.c @@ -78,7 +78,7 @@ SUBSTMAP read_substmap(char* filename) { } /* skip space between code and sequence */ for(;*p && isspace(*p);p++); - if (!p) continue; + if (!*p) continue; switch (*p) { case '\'': case '"':