diff options
Diffstat (limited to 'mdoc_hash.c')
-rw-r--r-- | mdoc_hash.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mdoc_hash.c b/mdoc_hash.c index 8543e38c..2204ac5a 100644 --- a/mdoc_hash.c +++ b/mdoc_hash.c @@ -1,6 +1,7 @@ /* $Id$ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> + * Copyright (c) 2015 Ingo Schwarze <schwarze@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -67,26 +68,26 @@ mdoc_hash_find(const char *p) int major, i, j; if (0 == p[0]) - return(TOKEN_NONE); + return TOKEN_NONE; if ( ! isalpha((unsigned char)p[0]) && '%' != p[0]) - return(TOKEN_NONE); + return TOKEN_NONE; if (isalpha((unsigned char)p[1])) major = 12 * (tolower((unsigned char)p[1]) - 97); else if ('1' == p[1]) major = 12 * 26; else - return(TOKEN_NONE); + return TOKEN_NONE; if (p[2] && p[3]) - return(TOKEN_NONE); + return TOKEN_NONE; for (j = 0; j < 12; j++) { if (UCHAR_MAX == (i = table[major + j])) break; if (0 == strcmp(p, mdoc_macronames[i])) - return(i); + return i; } - return(TOKEN_NONE); + return TOKEN_NONE; } |