Skip to content

Commit

Permalink
Merge pull request #110 from Gaspard--/fix_clang_calloc_warning
Browse files Browse the repository at this point in the history
Fix warning about inverted calloc arguments
  • Loading branch information
SanderMertens authored Aug 29, 2024
2 parents 531ced7 + 25c6bb1 commit fa4afd6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions drivers/test/src/cdiff.c
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ void cdiff_file_write(

/* If no element specified for writing, write to new text element. */
if (!file->cur && file->isNew) {
cdiff_elem *el = calloc(sizeof(cdiff_elem), 1);
cdiff_elem *el = calloc(1, sizeof(cdiff_elem));
el->kind = CDIFF_TEXT;
el->body = ut_strbuf_get(&file->writeBuffer);
if (!file->elements) {
Expand Down Expand Up @@ -730,4 +730,3 @@ void cdiff_file_dedent(
ut_assert(file->indent != 0, "too many dedents");
file->indent --;
}

0 comments on commit fa4afd6

Please sign in to comment.