]> git.ipfire.org Git - thirdparty/strongswan.git/commitdiff
Fixed check for log groups when debug_t is unsigned.
authorTobias Brunner <tobias@strongswan.org>
Fri, 25 Nov 2011 08:48:32 +0000 (09:48 +0100)
committerTobias Brunner <tobias@strongswan.org>
Fri, 25 Nov 2011 08:48:32 +0000 (09:48 +0100)
The range and signedness of enum types is up to the compiler.

src/libcharon/plugins/stroke/stroke_socket.c

index 808906f00e43bc8025f90d3341a8d5505cf37218..c35939d4f646ef0ecbd21c3d1f703f9216d833c5 100644 (file)
@@ -447,7 +447,7 @@ static void stroke_loglevel(private_stroke_socket_t *this,
                 msg->loglevel.level, msg->loglevel.type);
 
        group = enum_from_name(debug_names, msg->loglevel.type);
-       if (group < 0)
+       if ((int)group < 0)
        {
                fprintf(out, "invalid type (%s)!\n", msg->loglevel.type);
                return;