diff options
author | Dave Barach <dave@barachs.net> | 2016-08-04 18:58:05 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2016-08-05 13:21:59 +0000 |
commit | 56faee837281c7f9c28aa40dbf0f6e4620b76be8 (patch) | |
tree | 9fc45d3dca2bda5ff6c168fd943a9a6a55d0d2ab /svm/ssvm.c | |
parent | 91c7d387fbfdf109f422c56ec5a4a21c9bbd9d02 (diff) |
VPP-189 Clean up more coverity warnings
Change-Id: I1b971ab326dc334a4743fd7d4184cef106b0523d
Signed-off-by: Dave Barach <dave@barachs.net>
Diffstat (limited to 'svm/ssvm.c')
-rw-r--r-- | svm/ssvm.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/svm/ssvm.c b/svm/ssvm.c index 5db14231368..337840ffa81 100644 --- a/svm/ssvm.c +++ b/svm/ssvm.c @@ -43,7 +43,13 @@ ssvm_master_init (ssvm_private_t * ssvm, u32 master_index) return SSVM_API_ERROR_CREATE_FAILURE; } - lseek (ssvm_fd, ssvm->ssvm_size, SEEK_SET); + if (lseek (ssvm_fd, ssvm->ssvm_size, SEEK_SET) < 0) + { + clib_unix_warning ("lseek"); + close (ssvm_fd); + return SSVM_API_ERROR_SET_SIZE; + } + if (write (ssvm_fd, &junk, 1) != 1) { clib_unix_warning ("set ssvm size"); |