Silence another compiler warning (-Wimplicit-fallthrough)
authorMikael Berthe <mikael@lilotux.net>
Fri, 28 Sep 2018 17:56:42 +0200
changeset 2327 8ecc28068748
parent 2326 54b4272de463
child 2328 1e24d93746d6
Silence another compiler warning (-Wimplicit-fallthrough)
mcabber/mcabber/commands.c
--- a/mcabber/mcabber/commands.c	Fri Sep 28 06:45:58 2018 +0200
+++ b/mcabber/mcabber/commands.c	Fri Sep 28 17:56:42 2018 +0200
@@ -621,13 +621,10 @@
   if (jidres[0] == '.' &&
       (jidres[1] == '\0' || jidres[1] == JID_RESOURCE_SEPARATOR)) {
     //Special jid: . or ./resource
-    switch (jidres[1]) {
-      case JID_RESOURCE_SEPARATOR:
-        resource = jidres+2;
-      case '\0':
-        if (current_buddy)
-          bud = BUDDATA(current_buddy);
-    }
+    if (current_buddy)
+      bud = BUDDATA(current_buddy);
+    if (jidres[1] == JID_RESOURCE_SEPARATOR)
+      resource = jidres+2;
   } else {
     char *tmp;
     if (!check_jid_syntax(jidres) &&
@@ -3607,6 +3604,7 @@
               g_free(bjid);
             }
           }
+          /* FALLTHRU */
       case iqreq_version:
       case iqreq_time:
       case iqreq_last: