Fix the prevent issue (CID 43204)
authorDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 4 Apr 2013 01:15:33 +0000 (10:15 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Thu, 4 Apr 2013 01:15:33 +0000 (10:15 +0900)
Logically dead code (DEADCODE)
Execution cannot reach this statement "close(fd);"

Change-Id: I54a80f24b43b9006990b05f6dbb9fc2dffb66474

bt-share/src/bt-share-common.c

index 4fd3a35..59b69aa 100644 (file)
@@ -195,7 +195,6 @@ char *_bt_share_create_transfer_file(char *text)
        write_size = write(fd, content, strlen(content));
        g_free(content);
        close(fd);
-       fd = -1;
 
        if (write_size < 0) {
                ERR("Fail to write in file");
@@ -204,9 +203,6 @@ char *_bt_share_create_transfer_file(char *text)
 
        return file;
 fail:
-       if (fd > 0)
-               close(fd);
-
        g_free(file);
        return NULL;
 }