DBG("USB disconnected but temp file is remaind.\
It will be deleted.");
- if (g_mgr->ftemp_st.fhandle != INVALID_FILE) {
+ if (g_mgr->ftemp_st.fhandle != NULL) {
DBG("handle is found. At first close file");
_util_file_close(g_mgr->ftemp_st.fhandle);
- g_mgr->ftemp_st.fhandle = INVALID_FILE;
+ g_mgr->ftemp_st.fhandle = NULL;
}
if (remove(g_mgr->ftemp_st.filepath) < 0) {
ERR_SECURE("remove(%s) Fail", g_mgr->ftemp_st.filepath);
while (flag) {
mtp_int32 status = 0;
status = read(g_pipefd[0], &evt, sizeof(mtp_event_t));
- if(( status== -1) && errno == EINTR) {
+ if ((status == -1) && errno == EINTR) {
ERR("read() Fail");
continue;
}
previous_val = _util_get_local_lock_status();
_util_get_lock_status(¤t_val);
- if (previous_val == current_val) {
+ if (previous_val == current_val)
return;
- }
_util_set_local_lock_status(current_val);
DBG("action[%d], param1[%ld], param2[%ld]\n", action, param1, param2);
status = write(g_pipefd[1], &event, sizeof(mtp_event_t));
- if(status== -1 || errno == EINTR) {
+ if (status == -1 || errno == EINTR) {
ERR("Event write over pipe Fail, status = [%d], pipefd = [%d], errno [%d]\n",
status, g_pipefd[1], errno);
}
DBG("Action : START MTP OPERATION");
status = write(g_pipefd[1], &event, sizeof(mtp_event_t));
- if(status== -1 || errno == EINTR) {
+ if (status == -1 || errno == EINTR) {
ERR("Event write over pipe Fail, status= [%d],pipefd = [%d], errno [%d]\n",
status, g_pipefd[1], errno);
return FALSE;