mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-18 15:49:56 +00:00
Logging callid: Fix some sizeof() references per coding guidelines.
git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/11@405281 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1294,7 +1294,7 @@ struct ast_callid *ast_create_callid(void)
|
|||||||
{
|
{
|
||||||
struct ast_callid *call;
|
struct ast_callid *call;
|
||||||
|
|
||||||
call = ao2_alloc_options(sizeof(struct ast_callid), NULL, AO2_ALLOC_OPT_LOCK_NOLOCK);
|
call = ao2_alloc_options(sizeof(*call), NULL, AO2_ALLOC_OPT_LOCK_NOLOCK);
|
||||||
if (!call) {
|
if (!call) {
|
||||||
ast_log(LOG_ERROR, "Could not allocate callid struct.\n");
|
ast_log(LOG_ERROR, "Could not allocate callid struct.\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
@@ -1310,7 +1310,8 @@ struct ast_callid *ast_create_callid(void)
|
|||||||
struct ast_callid *ast_read_threadstorage_callid(void)
|
struct ast_callid *ast_read_threadstorage_callid(void)
|
||||||
{
|
{
|
||||||
struct ast_callid **callid;
|
struct ast_callid **callid;
|
||||||
callid = ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
|
|
||||||
|
callid = ast_threadstorage_get(&unique_callid, sizeof(*callid));
|
||||||
if (callid && *callid) {
|
if (callid && *callid) {
|
||||||
ast_callid_ref(*callid);
|
ast_callid_ref(*callid);
|
||||||
return *callid;
|
return *callid;
|
||||||
@@ -1322,8 +1323,7 @@ struct ast_callid *ast_read_threadstorage_callid(void)
|
|||||||
|
|
||||||
int ast_callid_threadassoc_change(struct ast_callid *callid)
|
int ast_callid_threadassoc_change(struct ast_callid *callid)
|
||||||
{
|
{
|
||||||
struct ast_callid **id =
|
struct ast_callid **id = ast_threadstorage_get(&unique_callid, sizeof(*id));
|
||||||
ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
|
|
||||||
|
|
||||||
if (!id) {
|
if (!id) {
|
||||||
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
|
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
|
||||||
@@ -1353,7 +1353,8 @@ int ast_callid_threadassoc_change(struct ast_callid *callid)
|
|||||||
int ast_callid_threadassoc_add(struct ast_callid *callid)
|
int ast_callid_threadassoc_add(struct ast_callid *callid)
|
||||||
{
|
{
|
||||||
struct ast_callid **pointing;
|
struct ast_callid **pointing;
|
||||||
pointing = ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
|
|
||||||
|
pointing = ast_threadstorage_get(&unique_callid, sizeof(*pointing));
|
||||||
if (!(pointing)) {
|
if (!(pointing)) {
|
||||||
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
|
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
|
||||||
return -1;
|
return -1;
|
||||||
@@ -1374,10 +1375,11 @@ int ast_callid_threadassoc_add(struct ast_callid *callid)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int ast_callid_threadassoc_remove()
|
int ast_callid_threadassoc_remove(void)
|
||||||
{
|
{
|
||||||
struct ast_callid **pointing;
|
struct ast_callid **pointing;
|
||||||
pointing = ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
|
|
||||||
|
pointing = ast_threadstorage_get(&unique_callid, sizeof(*pointing));
|
||||||
if (!(pointing)) {
|
if (!(pointing)) {
|
||||||
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
|
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
|
||||||
return -1;
|
return -1;
|
||||||
|
|||||||
Reference in New Issue
Block a user