10 Commits

Author SHA1 Message Date
Nicolas Williams
5f63215d0d Always perform == or != operation on cmp function result
Although not required to address bad code generation in
some versions of gcc 9 and 10, a coding style that requires
explicit comparison of the result to zero before use is
both clearer and would have avoided the generation of bad
code.

This change converts all use of cmp function usage from

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

to

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

for all C library cmp functions and related:

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

Change-Id: Ic60c15e1e3a07e4faaf10648eefe3adae2543188
2021-11-24 22:30:44 -05:00
Quanah Gibson-Mount
7c16ce3457 Minor typo/grammar fixes 2017-03-10 15:47:43 -05:00
Love Hornquist Astrand
0879b9831a remove trailing whitespace 2011-05-21 11:57:31 -07:00
Love Hörnquist Åstrand
6937d41a02 remove trailing whitespace
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23815 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 09:21:03 +00:00
Love Hörnquist Åstrand
5fed824f37 its vs it\'s etc. From Bjorn Sandell
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@22071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-11-14 20:04:50 +00:00
Love Hörnquist Åstrand
b42ab99857 Check for seteuid failure, prompted by MIT advisory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17876 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-08-08 21:31:02 +00:00
Johan Danielsson
cbcdc68e67 in unused code: pass file mode in call to open(); found by Martin Laubach
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11067 ec53bebd-3082-4978-b11e-865c3cabbd6b
2002-08-09 13:19:41 +00:00
Assar Westerlund
dd993af961 revert last change - we do not want this to depend on libroken
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9090 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-10-02 06:22:04 +00:00
Assar Westerlund
3e00ddf50d use esetenv
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9089 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-10-02 05:06:04 +00:00
Assar Westerlund
408afcd320 dce stuff, by way of From Ake Sandgren <ake@cs.umu.se>
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8506 ec53bebd-3082-4978-b11e-865c3cabbd6b
2000-07-01 19:19:31 +00:00