mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-03-31 02:33:44 +00:00
Merge pull request #426 from signalwire/mod_json_cdr
[mod_json_cdr] scan-build: Fix dead assignments.
This commit is contained in:
commit
4bb96f4bcd
@ -219,7 +219,7 @@ static void backup_cdr(cdr_data_t *data)
|
|||||||
} while (!(x<0) && json_len > (wrote += x));
|
} while (!(x<0) && json_len > (wrote += x));
|
||||||
if (!(x<0)) do { x = write(fd, "\n", 1);
|
if (!(x<0)) do { x = write(fd, "\n", 1);
|
||||||
} while (!(x<0) && x<1);
|
} while (!(x<0) && x<1);
|
||||||
close(fd); fd = -1;
|
close(fd);
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(data->uuid), SWITCH_LOG_ERROR, "Error writing [%s]\n",path);
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(data->uuid), SWITCH_LOG_ERROR, "Error writing [%s]\n",path);
|
||||||
if (0 > unlink(path))
|
if (0 > unlink(path))
|
||||||
@ -285,7 +285,7 @@ static void process_cdr(cdr_data_t *data)
|
|||||||
} while (!(x<0) && json_len > (wrote += x));
|
} while (!(x<0) && json_len > (wrote += x));
|
||||||
if (!(x<0)) do { x = write(fd, "\n", 1);
|
if (!(x<0)) do { x = write(fd, "\n", 1);
|
||||||
} while (!(x<0) && x<1);
|
} while (!(x<0) && x<1);
|
||||||
close(fd); fd = -1;
|
close(fd);
|
||||||
if (x < 0) {
|
if (x < 0) {
|
||||||
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(data->uuid), SWITCH_LOG_ERROR, "Error writing [%s]\n",path);
|
switch_log_printf(SWITCH_CHANNEL_UUID_LOG(data->uuid), SWITCH_LOG_ERROR, "Error writing [%s]\n",path);
|
||||||
if (0 > unlink(path))
|
if (0 > unlink(path))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user