diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 15:13:08 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-12-19 18:10:13 +0000 |
commit | c4decc56d2c4b7f4287ea382c7244cd0da1b5c24 (patch) | |
tree | 7cc56c2781f447e207902ab205d4d53d4472a676 /i18nutil | |
parent | 746da6b7fb3829e1ca23a4b8dfec6c502bac681c (diff) |
coverity#1343620 Unchecked return value
Change-Id: I5ac69ef416a1317644b451442a51531806d9cf0d
Diffstat (limited to 'i18nutil')
-rw-r--r-- | i18nutil/source/utility/paper.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx index 6223b6bc3be4..93f81ce58673 100644 --- a/i18nutil/source/utility/paper.cxx +++ b/i18nutil/source/utility/paper.cxx @@ -233,9 +233,9 @@ PaperInfo PaperInfo::getSystemDefaultPaper() char aBuffer[ 1024 ]; aBuffer[0] = 0; char *pBuffer = fgets( aBuffer, sizeof(aBuffer), pPipe ); - pclose( pPipe ); + bool bOk = pclose(pPipe) == 0; - if (pBuffer && *pBuffer != 0) + if (bOk && pBuffer && *pBuffer != 0) { OString aPaper(pBuffer); aPaper = aPaper.trim(); |