summaryrefslogtreecommitdiffstats
path: root/debian/uncrustify-trinity/uncrustify-trinity-0.78.0/tests/expected/c/00004-switch.c
blob: ffb54327b7fb6ae806f5da3cbe6294afe7660eea (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;
}