{
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;
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;
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");
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;
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;