Fix Linux kernel coding style error
authorDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Sat, 17 Jul 2021 08:30:29 +0000 (10:30 +0200)
committerDimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
Mon, 19 Jul 2021 04:07:41 +0000 (06:07 +0200)
switch and case should be at the same indent

Signed-off-by: Dimitri Papadopoulos <3350651-DimitriPapadopoulos@users.noreply.gitlab.com>
dtls.c
jsondump.c
pulse.c

diff --git a/dtls.c b/dtls.c
index cdb578ed9cdde922b287d11b45b1202dbc277efe..434feba8fb395c306a9b4f2fc65d7e06c2ef7015 100644 (file)
--- a/dtls.c
+++ b/dtls.c
@@ -206,17 +206,17 @@ int udp_tos_update(struct openconnect_info *vpninfo, struct pkt *pkt)
 
        /* Extract TOS field from IP header (IPv4 and IPv6 differ) */
        switch(pkt->data[0] >> 4) {
-               case 4:
-                       tos = pkt->data[1];
-                       break;
-               case 6:
-                       tos = (load_be16(pkt->data) >> 4) & 0xff;
-                       break;
-               default:
-                       vpn_progress(vpninfo, PRG_ERR,
-                                    _("Unknown packet (len %d) received: %02x %02x %02x %02x...\n"),
-                                    pkt->len, pkt->data[0], pkt->data[1], pkt->data[2], pkt->data[3]);
-                       return -EINVAL;
+       case 4:
+               tos = pkt->data[1];
+               break;
+       case 6:
+               tos = (load_be16(pkt->data) >> 4) & 0xff;
+               break;
+       default:
+               vpn_progress(vpninfo, PRG_ERR,
+                            _("Unknown packet (len %d) received: %02x %02x %02x %02x...\n"),
+                            pkt->len, pkt->data[0], pkt->data[1], pkt->data[2], pkt->data[3]);
+               return -EINVAL;
        }
 
        /* set the actual value */
index e0e7c713377cebacaa5bcc3971d0492c6c030f9c..a18780b516d77a0605cb79ce222412b5aaad382e 100644 (file)
@@ -114,28 +114,28 @@ static void dump_json_value(struct openconnect_info *vpninfo, int lvl,
                print_depth_shift(buf, depth);
        }
        switch (value->type) {
-               case json_none:
-               default:
-                       buf_append(buf, "none\n");
-                       break;
-               case json_object:
-                       dump_json_object(vpninfo, lvl, buf, value, depth+1);
-                       return;
-               case json_array:
-                       dump_json_array(vpninfo, lvl, buf, value, depth+1);
-                       return;
-               case json_integer:
-                       buf_append(buf, "int: %10" PRId64 "\n", value->u.integer);
-                       break;
-               case json_double:
-                       buf_append(buf, "double: %f\n", value->u.dbl);
-                       break;
-               case json_string:
-                       buf_append(buf, "string: %s\n", value->u.string.ptr);
-                       break;
-               case json_boolean:
-                       buf_append(buf, "bool: %d\n", value->u.boolean);
-                       break;
+       case json_none:
+       default:
+               buf_append(buf, "none\n");
+               break;
+       case json_object:
+               dump_json_object(vpninfo, lvl, buf, value, depth+1);
+               return;
+       case json_array:
+               dump_json_array(vpninfo, lvl, buf, value, depth+1);
+               return;
+       case json_integer:
+               buf_append(buf, "int: %10" PRId64 "\n", value->u.integer);
+               break;
+       case json_double:
+               buf_append(buf, "double: %f\n", value->u.dbl);
+               break;
+       case json_string:
+               buf_append(buf, "string: %s\n", value->u.string.ptr);
+               break;
+       case json_boolean:
+               buf_append(buf, "bool: %d\n", value->u.boolean);
+               break;
        }
        print_buf(vpninfo, lvl, buf);
 
diff --git a/pulse.c b/pulse.c
index d2d818ab149e9823b45db152bd5aaa99fc5ed108..2c4671386b3ec79538491d843cf776b82d31f5e1 100644 (file)
--- a/pulse.c
+++ b/pulse.c
@@ -1689,27 +1689,26 @@ static int pulse_authenticate(struct openconnect_info *vpninfo, int connecting)
                        val = load_be32(avp_p);
 
                        switch (val) {
-               case 1: /* Prompt for both username and password. */
-                       prompt_flags = PROMPT_PASSWORD | PROMPT_USERNAME;
-                       break;
-               case 3: /* Prompt for password.*/
-               case 15:
-                       prompt_flags = PROMPT_PASSWORD;
-                       break;
-               case 5: /* Prompt for username.*/
-                       prompt_flags = PROMPT_USERNAME;
-                       break;
-
-               default:
-                       /* It does no harm to submit both, as anything unwanted is ignored. */
-                       vpn_progress(vpninfo, PRG_ERR,
-                                    _("Unknown D73 prompt value 0x%x. Will prompt for both username and password.\n"),
-                                    val);
-                       vpn_progress(vpninfo, PRG_ERR,
-                                    _("Please report this value and the behaviour of the official client.\n"));
-                       prompt_flags = PROMPT_PASSWORD | PROMPT_USERNAME;
-                       break;
-               }
+                       case 1: /* Prompt for both username and password. */
+                               prompt_flags = PROMPT_PASSWORD | PROMPT_USERNAME;
+                               break;
+                       case 3: /* Prompt for password.*/
+                       case 15:
+                               prompt_flags = PROMPT_PASSWORD;
+                               break;
+                       case 5: /* Prompt for username.*/
+                               prompt_flags = PROMPT_USERNAME;
+                               break;
+                       default:
+                               /* It does no harm to submit both, as anything unwanted is ignored. */
+                               vpn_progress(vpninfo, PRG_ERR,
+                                            _("Unknown D73 prompt value 0x%x. Will prompt for both username and password.\n"),
+                                            val);
+                               vpn_progress(vpninfo, PRG_ERR,
+                                            _("Please report this value and the behaviour of the official client.\n"));
+                               prompt_flags = PROMPT_PASSWORD | PROMPT_USERNAME;
+                               break;
+                       }
                } else if (avp_vendor == VENDOR_JUNIPER2 && avp_code == 0xd7b) {
                        free(signin_prompt);
                        signin_prompt = strndup(avp_p, avp_len);