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
Asanka C. Herath
acc27fd2bd Include <roken.h> before <gssapi.h> 2010-12-01 17:54:29 -05:00
Love Hornquist Astrand
32ee735d73 drop RCSID 2009-08-26 23:15:35 -07:00
Love Hörnquist Åstrand
50983130b0 spelling
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24403 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:38:28 +00:00
Love Hörnquist Åstrand
ef9954ec29 use gssapi/*.h
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24402 ec53bebd-3082-4978-b11e-865c3cabbd6b
2009-01-25 00:38:18 +00:00
Love Hörnquist Åstrand
7c4ee0b0e2 fix spelling
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24066 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-12-11 04:51:59 +00:00
Love Hörnquist Åstrand
25a7b258ea make sure we dont print off the end of the gss_buffer_t, they are defined to not included NULL, in heimdal they are but thats an implementation detail, dont teach people about that. From: Christian Krause
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24035 ec53bebd-3082-4978-b11e-865c3cabbd6b
2008-11-12 04:19:52 +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
e03cd59065 Switch oid to one that is exported.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@20488 ec53bebd-3082-4978-b11e-865c3cabbd6b
2007-04-21 06:29:11 +00:00
Love Hörnquist Åstrand
4d93abeafe Test lucid oid.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@18415 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-10-12 08:52:08 +00:00
Love Hörnquist Åstrand
2e7df17f9d make compile again
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17711 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-28 10:12:08 +00:00
Love Hörnquist Åstrand
d111e22218 Add test for gss_oid_to_str()
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17680 ec53bebd-3082-4978-b11e-865c3cabbd6b
2006-06-22 04:16:09 +00:00