From 35d0d9bcbb33b64c3cfd83548fc9fc1cbdb5295e Mon Sep 17 00:00:00 2001 From: Victor Wagner Date: Thu, 28 Apr 2016 07:29:42 +0300 Subject: [PATCH] Fix couple of errors from coverity scan --- src/ole.c | 4 ++-- src/substmap.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 '"': -- 2.39.5