GCC 4.1 compiler warning fixes.
[silc.git] / lib / silcclient / command_reply.c
index 73e45893ef9f4011f0eb460b2b0b74453ba9c2f0..8317c61717481920e8c03e7c857dcddf1f45812d 100644 (file)
@@ -1252,8 +1252,8 @@ SILC_FSM_STATE(silc_client_command_reply_join)
   }
 
   /* Get channel mode */
-  tmp = silc_argument_get_arg_type(args, 5, NULL);
-  if (tmp)
+  tmp = silc_argument_get_arg_type(args, 5, &len);
+  if (tmp && len == 4)
     SILC_GET32_MSB(mode, tmp);
   channel->mode = mode;
 
@@ -1440,6 +1440,11 @@ SILC_FSM_STATE(silc_client_command_reply_cmode)
     goto out;
   }
 
+  /* Get founder public key */
+  tmp = silc_argument_get_arg_type(args, 4, &len);
+  if (tmp)
+    silc_public_key_payload_decode(tmp, len, &public_key);
+
   /* Get channel mode */
   tmp = silc_argument_get_arg_type(args, 3, &len);
   if (!tmp || len != 4) {
@@ -1447,11 +1452,6 @@ SILC_FSM_STATE(silc_client_command_reply_cmode)
     goto out;
   }
 
-  /* Get founder public key */
-  tmp = silc_argument_get_arg_type(args, 4, &len);
-  if (tmp)
-    silc_public_key_payload_decode(tmp, len, &public_key);
-
   silc_rwlock_wrlock(channel->internal.lock);
 
   /* Save the mode */