aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--luhncheck.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/luhncheck.c b/luhncheck.c
index 51f04ab..65315e4 100644
--- a/luhncheck.c
+++ b/luhncheck.c
@@ -9,6 +9,9 @@
NUSAGE(2, "number ...");
+#if defined(__GNUC__)
+__attribute__((__pure__))
+#endif
static int
check_luhn(const char *s)
{
@@ -27,6 +30,8 @@ check_luhn(const char *s)
break;
s++;
+ /* fall through */
+
case 1:
if ('0' <= *s && *s <= '9')
sum += (unsigned)(*s - '0');