Skip to content

Commit

Permalink
fix problems or otherwise improve code based on issues raised by Kloc…
Browse files Browse the repository at this point in the history
…work

git-svn-id: svn+q:///qpdf/trunk@690 71b93d88-0707-0410-a8cf-f5a4172ac649
  • Loading branch information
jberkenbilt committed Sep 14, 2009
1 parent b93c340 commit 0ded90e
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion libqpdf/PCRE.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ PCRE::Match::nMatches() const
return this->nmatches;
}

PCRE::PCRE(char const* pattern, int options) throw (Exception)
PCRE::PCRE(char const* pattern, int options) throw (PCRE::Exception)
{
char const *errptr;
int erroffset;
Expand Down
20 changes: 9 additions & 11 deletions libqpdf/QPDF_linearization.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,19 +113,17 @@ QPDF::isLinearized()
}
else
{
if ((p = (char*)memchr(p, '\0', tbuf_size - (p - buf))) != 0)
p = (char*)memchr(p, '\0', tbuf_size - (p - buf));
assert(p != 0);
while ((p - buf < tbuf_size) && (*p == 0))
{
QTC::TC("qpdf", "QPDF lindict null found");
while ((p - buf < tbuf_size) && (*p == 0))
{
++p;
}
if ((p - buf) == tbuf_size)
{
break;
}
QTC::TC("qpdf", "QPDF lindict searching after null");
++p;
}
if ((p - buf) == tbuf_size)
{
break;
}
QTC::TC("qpdf", "QPDF lindict searching after null");
}
}

Expand Down
1 change: 1 addition & 0 deletions libtests/flate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ FILE* safe_fopen(char const* filename, char const* mode)
{
std::cerr << "fopen " << filename << " failed: " << strerror(errno)
<< std::endl;
exit(2);
}
return result;
}
Expand Down
1 change: 1 addition & 0 deletions libtests/png_filter.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ FILE* safe_fopen(char const* filename, char const* mode)
{
std::cerr << "fopen " << filename << " failed: " << strerror(errno)
<< std::endl;
exit(2);
}
return result;
}
Expand Down

0 comments on commit 0ded90e

Please sign in to comment.