It was used just on few places and we directly call memset on many other places
[~/sssd]$ git grep memset | grep sizeof | wc -l 97
It is not possible to compile sssd on rawhide because samba made such macros public and it is used in ndr.h
ndr.h
https://bugzilla.redhat.com/show_bug.cgi?id=1671507
OK, it seems odd to export a non-namespaced macro in a public header, but then we can't use this macro either. IIRC our copy of ZERO_STRUCT came from Samba anyway.
btw do you know, from a C perspective, why the ZERO_STRUCT macro would cast the pointer to char?
anyway, LGTM, will run the commit through CI.
But they "recently" changed definition from memset -> memset_s
memset
memset_s
The function memset expect void * and IIRC you can pass any pointer there. You would need to probably ask original authors :-)
void *
My guessing would be that they wanted to use the macro for const struct .... Which is far from ideal use-case IMHO.
const struct ...
Commit 7133c7fc fixes this pull-request
Pull-Request has been merged by jhrozek
It was used just on few places and we directly call memset on many
other places
[~/sssd]$ git grep memset | grep sizeof | wc -l
97
It is not possible to compile sssd on rawhide because samba made such macros public
and it is used in
ndr.hhttps://bugzilla.redhat.com/show_bug.cgi?id=1671507