freeipa/daemons/ipa-slapi-plugins/topology
Alexander Bokovoy 9043b8d534 Fix use of comparison functions to avoid GCC bug 95189
Due to a bug in GCC 9 and GCC 10 optimizing code, all C library
comparison functions should be used with explicit result comparison in
the code to avoid problems described in

http://r6.ca/blog/20200929T023701Z.html

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189

The code below is affected:

```
    if (strcmp(a, b) || !strcmp(c, d)) ...
```

while the code below is not affected:

```
    if (strcmp(a, b) != 0 || strcmp(c, d)) == 0
```

for all C library cmp functions and related:

 - strcmp(), strncmp()
 - strcasecmp(), strncasecmp()
 - stricmp(), strnicmp()
 - memcmp()

This PR idea is based on the pull request by 'Nicolas Williams <nico@twosigma.com>'
to Heimdal Kerberos: https://github.com/heimdal/heimdal/pull/855

Signed-off-by: Alexander Bokovoy <abokovoy@redhat.com>
Reviewed-By: Florence Blanc-Renaud <flo@redhat.com>
Reviewed-By: Rob Crittenden <rcritten@redhat.com>
2021-11-23 10:31:34 +01:00
..
ipa-topology-conf.ldif ds: Support renaming of a replication plugin in 389-ds 2021-06-01 17:09:28 +03:00
Makefile.am slapi plugins: fix CFLAGS 2017-03-15 08:55:12 +00:00
topology_agmt.c handle multiple managed suffixes 2015-10-15 14:24:33 +02:00
topology_cfg.c Fix use of comparison functions to avoid GCC bug 95189 2021-11-23 10:31:34 +01:00
topology_init.c prevent moving of topology entries out of managed scope by modrdn operations 2016-01-21 12:52:08 +01:00
topology_post.c Fix use of comparison functions to avoid GCC bug 95189 2021-11-23 10:31:34 +01:00
topology_pre.c Fix use of comparison functions to avoid GCC bug 95189 2021-11-23 10:31:34 +01:00
topology_util.c Fix use of comparison functions to avoid GCC bug 95189 2021-11-23 10:31:34 +01:00
topology.h prevent moving of topology entries out of managed scope by modrdn operations 2016-01-21 12:52:08 +01:00