Skip to content

Commit

Permalink
Fix calloc argument order. (#317)
Browse files Browse the repository at this point in the history
  • Loading branch information
Kerilk authored Feb 5, 2025
1 parent 48462d2 commit 662b8ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cuda/tracer_cuda_helpers.include.c
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ static const void * _wrap_and_cache_export_table(const void *pExportTable, const
pthread_mutex_unlock(&_cuda_export_tables_mutex);
return export_table_h->export_table;
}
export_table_h = calloc(sizeof(struct _export_table_h), 1);
export_table_h = calloc(1, sizeof(struct _export_table_h));
if (!export_table_h) {
pthread_mutex_unlock(&_cuda_export_tables_mutex);
return pExportTable;
Expand Down Expand Up @@ -311,7 +311,7 @@ struct _cuda_event_s * _events = NULL;
static inline void _register_cuda_event(CUevent hStart, CUevent hStop, CUcontext hContext) {
struct _cuda_event_s *ev;

ev = (struct _cuda_event_s *)calloc(sizeof(struct _cuda_event_s), 1);
ev = (struct _cuda_event_s *)calloc(1, sizeof(struct _cuda_event_s));
if (!ev)
goto error;

Expand Down

0 comments on commit 662b8ec

Please sign in to comment.