X-Git-Url: https://git.distorted.org.uk/~mdw/catacomb/blobdiff_plain/0f00dc4c8eb47e67bc0f148c2dd109f73a451e0a..e275090f9f712a8d9dda4e309ce38bb520778016:/key/key-attr.c diff --git a/key/key-attr.c b/key/key-attr.c index e884d699..567fb92f 100644 --- a/key/key-attr.c +++ b/key/key-attr.c @@ -34,6 +34,7 @@ #include #include +#include #include #include "key.h" @@ -54,7 +55,7 @@ int key_chkident(const char *p) if (!p || !*p || strlen(p) > 255) return (-1); while (*p) { - if (*p == ':' || *p == '.' || isspace((unsigned char)*p)) + if (*p == ':' || *p == '.' || ISSPACE(*p)) return (-1); p++; } @@ -252,8 +253,7 @@ int key_settag(key_file *f, key *k, const char *tag) /* --- See if the new tag is the same as the old one --- */ - if ((!tag && !k->tag) || - (tag && k->tag && strcmp(tag, k->tag) == 0)) + if ((!tag && !k->tag) || (tag && k->tag && STRCMP(tag, ==, k->tag))) return (0); /* --- Allocate an entry for the new tag --- */