summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.1/tests/input/c/switch.c
blob: 5b760363cff6ddde7f6000d4dba1600c7e35112f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29

int foo(int op)
{
   switch (op)
   {
   case 1: {
         do_something();
         return 0;
      }

   case 2: 
      do_something_else();
      return 1;

   case 3:
   case 4:
      /* don't do anything */
      break;

   case 5:
      return 3;

   default:
      break;
   }

   return -1;
}