[mod_spandsp] scan-build: Argument with 'nonnull' attribute passed null in modem_init()

This commit is contained in:
Andrey Volk 2021-02-26 21:44:30 +03:00
parent e42ebbb33f
commit e4ec2e1043
1 changed files with 5 additions and 5 deletions

View File

@ -279,11 +279,11 @@ switch_status_t modem_init(modem_t *modem, modem_control_handler_t control_handl
modem->stty = ptsname(modem->master); modem->stty = ptsname(modem->master);
if (modem->stty == NULL) { if (modem->stty == NULL) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Fatal error: failed to obtain slave pty filename\n"); switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Fatal error: failed to obtain slave pty filename\n");
} } else {
modem->slave = open(modem->stty, O_RDWR);
modem->slave = open(modem->stty, O_RDWR); if (modem->slave < 0) {
if (modem->slave < 0) { switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Fatal error: failed to open slave pty %s\n", modem->stty);
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Fatal error: failed to open slave pty %s\n", modem->stty); }
} }
#endif #endif