Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
coverity: Fix Sizeof not portable (SIZEOF_MISMATCH)
Coverity reports that passing argument 'sizeof (ctx->attrs)' to calloc and then casting the return value to 'char **' looks suspicious. In fact, this is just plain wrong. It happens to work, in this particular case since sizeof (char ** const) happens to be equal to sizeof (char *), but this is not a portable assumption. So fix that by using 'sizeof (*ctx->attrs)' Signed-off-by: Robin Getz <[email protected]>
- Loading branch information