summaryrefslogtreecommitdiff
path: root/sal/qa/osl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-10-08 21:15:51 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-10-08 21:22:22 +0100
commit728c9d5f0d1335e160de43bd3f73b2a3168e8fcc (patch)
tree57453a5e458e9a10e463e9ecf27d5d4a3e24a4da /sal/qa/osl
parentdaef8b82d00bbe823f711f73895ef422376a2f95 (diff)
CID#982700 silence coverity
Change-Id: I01fddeeca503ebc045c2f0e53c5917e6218e9d6e
Diffstat (limited to 'sal/qa/osl')
-rw-r--r--sal/qa/osl/file/osl_File.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sal/qa/osl/file/osl_File.cxx b/sal/qa/osl/file/osl_File.cxx
index ab22c8549583..54966aca78c9 100644
--- a/sal/qa/osl/file/osl_File.cxx
+++ b/sal/qa/osl/file/osl_File.cxx
@@ -6107,8 +6107,12 @@ namespace osl_Directory
Directory::remove(buffer);
i = rtl_ustr_lastIndexOfChar(buffer, '/');
- buffer[i] = 0;
- Directory::remove(buffer);
+ assert(i != -1);
+ if (i != -1)
+ {
+ buffer[i] = 0;
+ Directory::remove(buffer);
+ }
}
//########################################