changeset 2327:8ecc28068748

Silence another compiler warning (-Wimplicit-fallthrough)
author Mikael Berthe <mikael@lilotux.net>
date Fri, 28 Sep 2018 17:56:42 +0200
parents 54b4272de463
children 1e24d93746d6
files mcabber/mcabber/commands.c
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- 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: