Commit Graph

13 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
Love Hornquist Astrand 077357c848 catch error from as.*printf 2010-05-30 13:37:07 -07:00
Love Hörnquist Åstrand 942a821fab remove RCSID
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@25171 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-05-04 06:17:40 +00:00
Love Hörnquist Åstrand e3e8374234 s/KRB5_PRINCIPAL_PARSE_MUST_REALM/KRB5_PRINCIPAL_PARSE_REQUIRE_REALM/
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24233 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-11 21:40:53 +00: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 e172367898 switch to utf8 encoding of all files
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@23814 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-09-13 08:53:55 +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 a48a647b4e Fix testcase for unparse_display.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21090 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-13 23:47:28 +00:00
Love Hörnquist Åstrand 09a90d78cc Test quoteing.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@21071 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-12 22:20:01 +00:00
Love Hörnquist Åstrand e9ae5054cd plug memory leaks.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20846 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-06-03 14:33:11 +00:00
Love Hörnquist Åstrand d6658d9d2f test parsing enterprise-names.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20224 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-02-15 04:18:08 +00:00
Love Hörnquist Åstrand 8ea293e426 Try to not leak memory.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18809 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-22 07:11:43 +00:00
Love Hörnquist Åstrand 4413356d16 Test principal parsing and unparsing.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18547 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-18 06:52:33 +00:00