]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
scepclient: Cast OID_UNKNOWN before comparing it to unsigned hash_algorithm_t
authorMartin Willi <martin@revosec.ch>
Thu, 8 May 2014 11:54:33 +0000 (13:54 +0200)
committerMartin Willi <martin@revosec.ch>
Fri, 16 May 2014 13:42:07 +0000 (15:42 +0200)
clang uses unsigned enums and complains about the always-false -1 check.

src/scepclient/scepclient.c

index d7abcb423502f3bb34acd2306a82b94cc59ab9f7..853490f61cd1cf253640da604e0fb36a8e229118 100644 (file)
@@ -896,7 +896,7 @@ int main(int argc, char **argv)
                                        }
                                        hash = hasher_algorithm_from_integrity(token->algorithm,
                                                                                                                   NULL);
-                                       if (hash == OID_UNKNOWN)
+                                       if (hash == (hash_algorithm_t)OID_UNKNOWN)
                                        {
                                                usage("invalid algorithm specified");
                                        }