Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
example/cmtime: Correct argument order in calloc call to fix warning
This commit fixes a compiler warning related to the use of calloc. ``` librdmacm/examples/cmtime.c:993:31: warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Wcalloc-transposed-args] 993 | nodes = calloc(sizeof *nodes, iter); | ^ librdmacm/examples/cmtime.c:993:31: note: earlier argument should specify number of elements, later size of each element ``` The warning was due to transposed arguments in the calloc call, where the number of elements and the size of each element were specified in the wrong order. The correct order for calloc's arguments is: void *calloc(size_t nmemb, size_t size) Signed-off-by: Li Zhijian <lizhijian@fujitsu.com>
- Loading branch information