summaryrefslogtreecommitdiff
path: root/main/logger.c
diff options
context:
space:
mode:
authorRichard Mudgett <rmudgett@digium.com>2014-01-10 18:17:48 +0000
committerRichard Mudgett <rmudgett@digium.com>2014-01-10 18:17:48 +0000
commit4bde62eb4047f89907f9331478b5520731996dfc (patch)
tree8b6c8184eb14bad0e8c1df4664015a81f666a875 /main/logger.c
parent42b087c2dfe8f50746a44a91e5cb382ccf4342a6 (diff)
Logging callid: Fix some sizeof() references per coding guidelines.
........ Merged revisions 405281 from http://svn.asterisk.org/svn/asterisk/branches/11 ........ Merged revisions 405282 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@405284 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'main/logger.c')
-rw-r--r--main/logger.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/main/logger.c b/main/logger.c
index c551a4c72..52bb5c021 100644
--- a/main/logger.c
+++ b/main/logger.c
@@ -1304,7 +1304,7 @@ struct ast_callid *ast_create_callid(void)
{
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) {
ast_log(LOG_ERROR, "Could not allocate callid struct.\n");
return NULL;
@@ -1320,7 +1320,8 @@ struct ast_callid *ast_create_callid(void)
struct ast_callid *ast_read_threadstorage_callid(void)
{
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) {
ast_callid_ref(*callid);
return *callid;
@@ -1332,8 +1333,7 @@ struct ast_callid *ast_read_threadstorage_callid(void)
int ast_callid_threadassoc_change(struct ast_callid *callid)
{
- struct ast_callid **id =
- ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
+ struct ast_callid **id = ast_threadstorage_get(&unique_callid, sizeof(*id));
if (!id) {
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
@@ -1363,7 +1363,8 @@ int ast_callid_threadassoc_change(struct ast_callid *callid)
int ast_callid_threadassoc_add(struct ast_callid *callid)
{
struct ast_callid **pointing;
- pointing = ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
+
+ pointing = ast_threadstorage_get(&unique_callid, sizeof(*pointing));
if (!(pointing)) {
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
return -1;
@@ -1387,7 +1388,8 @@ int ast_callid_threadassoc_add(struct ast_callid *callid)
int ast_callid_threadassoc_remove(void)
{
struct ast_callid **pointing;
- pointing = ast_threadstorage_get(&unique_callid, sizeof(struct ast_callid **));
+
+ pointing = ast_threadstorage_get(&unique_callid, sizeof(*pointing));
if (!(pointing)) {
ast_log(LOG_ERROR, "Failed to allocate thread storage.\n");
return -1;