commit | bfd61a3ec70b7d614f7d778e0959560f79fd7c4a | [log] [tgz] |
---|---|---|
author | Nicolas Iooss <[email protected]> | Sat May 20 12:11:41 2017 +0200 |
committer | Stephen Smalley <[email protected]> | Tue May 23 15:56:31 2017 -0400 |
tree | 66a68b61cb211b2fc3cbcbca3dcb0622dde09cb8 | |
parent | d00cc134837c36b47c374414668b29c4489b2725 [diff] |
libsepol: use the number of elements in calloc first argument When allocating an array with calloc(), the first argument usually is the number of items and the second one the size of an item. Doing so silences a warning reported by clang's static analyzer: kernel_to_cil.c:2050:14: warning: Call to 'calloc' has an allocation size of 0 bytes. cond_data = calloc(sizeof(struct cond_data), num); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Signed-off-by: Nicolas Iooss <[email protected]>