]> git.puffer.fish Git - mirror/frr.git/commit
lib: fix calloc warning on recent compiler 16958/head
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Mon, 30 Sep 2024 14:31:56 +0000 (11:31 -0300)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Mon, 30 Sep 2024 14:31:56 +0000 (11:31 -0300)
commit660146b57ad48f40ca4ea845cc8538500a8d4759
tree30a13c14ea1056e6857629e1180cabb59f747a86
parent8b1b5315c319240a6a5db2f163b7b063def89b5c
lib: fix calloc warning on recent compiler

Fix the following compiler warning:
```
lib/elf_py.c: In function _elffile_load_:
lib/elf_py.c:1310:34: warning: _calloc_ sizes specified with _sizeof_ in the earlier argument and not in the later argument [-Wcalloc-transposed-args]
 1310 |         w->sects = calloc(sizeof(PyObject *), w->ehdr->e_shnum);
      |                                  ^~~~~~~~
lib/elf_py.c:1310:34: note: earlier argument should specify number of elements, later size of each element
```

Signed-off-by: Rafael Zalamena <rzalamena@opensourcerouting.org>
lib/elf_py.c