mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-03 11:25:35 +00:00
Change ast_hangup() to return void and be NULL safe.
Since ast_hangup() is effectively a channel destructor, it should be a void function. * Make the few silly callers checking the return value no longer do so. Only the CDR and CEL unit tests checked the return value. * Make all callers take advantage of the NULL safe change and remove the NULL check before the call. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@394623 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -212,18 +212,10 @@ AST_TEST_DEFINE(app_group)
|
||||
}
|
||||
|
||||
exit_group_test:
|
||||
if (test_channel1) {
|
||||
ast_hangup(test_channel1);
|
||||
}
|
||||
if (test_channel2) {
|
||||
ast_hangup(test_channel2);
|
||||
}
|
||||
if (test_channel3) {
|
||||
ast_hangup(test_channel3);
|
||||
}
|
||||
if (test_channel4) {
|
||||
ast_hangup(test_channel4);
|
||||
}
|
||||
ast_hangup(test_channel1);
|
||||
ast_hangup(test_channel2);
|
||||
ast_hangup(test_channel3);
|
||||
ast_hangup(test_channel4);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user