seoz pushed a commit to branch master.

commit ab03f017887680e8a690e54219a65858dc5ced5b
Author: Daniel Juyung Seo <[email protected]>
Date:   Sat Jul 6 11:59:07 2013 +0900

    test_fileselector_entry.c: fixed unchecked return value warning which was 
spotted by coverity. CID 1040043.
---
 src/bin/test_fileselector_entry.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/bin/test_fileselector_entry.c 
b/src/bin/test_fileselector_entry.c
index d21b235..b2c0da2 100644
--- a/src/bin/test_fileselector_entry.c
+++ b/src/bin/test_fileselector_entry.c
@@ -68,7 +68,10 @@ static void
 create_dir_struct(void)
 {
    FILE *fp;
-   mkdir("/tmp/test_fs_bt", S_IRWXU);
+   int ret = 0;
+
+   ret = mkdir("/tmp/test_fs_bt", S_IRWXU);
+   if (ret < 0) return;
    fp = fopen("/tmp/test_fs_bt/a_file.txt", "w");
    if (fp) fclose(fp);
    fp = fopen("/tmp/test_fs_bt/k_file.txt", "w");
@@ -76,7 +79,8 @@ create_dir_struct(void)
    fp = fopen("/tmp/test_fs_bt/m_file.txt", "w");
    if (fp) fclose(fp);
 
-   mkdir("/tmp/test_fs_bt/a_subdir", S_IRWXU);
+   ret = mkdir("/tmp/test_fs_bt/a_subdir", S_IRWXU);
+   if (ret < 0) return;
    fp = fopen("/tmp/test_fs_bt/a_subdir/d_sub_file.txt", "w");
    if (fp) fclose(fp);
    fp = fopen("/tmp/test_fs_bt/a_subdir/j_sub_file.txt", "w");

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to