From: Markus Armbruster Date: Tue, 8 Jan 2013 17:02:07 +0000 (+0100) Subject: Simplify head_meanwhile() X-Git-Tag: v4.3.31~113 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=75619c37321bc669d18304fe670a63cdfe9c334e Simplify head_meanwhile() No functional change. --- diff --git a/src/lib/commands/head.c b/src/lib/commands/head.c index 1f85f702f..67e8fbcb1 100644 --- a/src/lib/commands/head.c +++ b/src/lib/commands/head.c @@ -137,18 +137,10 @@ head_printscoop(struct histstr (*hist)[MAXNOC], natid ano, natid vno) static char * head_meanwhile(int val) { - switch (val & 03) { - case 0: - return "Meanwhile"; - case 1: - return "On the other hand"; - case 2: - return "At the same time"; - case 3: - return "Although"; - } - /*NOTREACHED*/ - return ""; + static char *meanwhile[4] = { + "Meanwhile", "On the other hand", "At the same time", "Although" + }; + return meanwhile[val % 4]; } static void