summaryrefslogtreecommitdiffstats
path: root/chars.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-10-06 18:32:19 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-10-06 18:32:19 +0000
commitcdd9965f2080354017315270cbc3dc2da6378df9 (patch)
treeabceb46c894355584ad94178001ebb10ff35db04 /chars.c
parent2c5e2d1085930e82ce52bf9402182a0630e8f39d (diff)
downloadmandoc-cdd9965f2080354017315270cbc3dc2da6378df9.tar.gz
modernize style: "return" is not a function
Diffstat (limited to 'chars.c')
-rw-r--r--chars.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/chars.c b/chars.c
index 58f3e179..3b51d226 100644
--- a/chars.c
+++ b/chars.c
@@ -95,7 +95,7 @@ mchars_alloc(void)
}
tab->htab = htab;
- return(tab);
+ return tab;
}
int
@@ -104,7 +104,7 @@ mchars_spec2cp(const struct mchars *arg, const char *p, size_t sz)
const struct ln *ln;
ln = find(arg, p, sz);
- return(ln != NULL ? ln->unicode : sz == 1 ? (unsigned char)*p : -1);
+ return ln != NULL ? ln->unicode : sz == 1 ? (unsigned char)*p : -1;
}
int
@@ -113,7 +113,7 @@ mchars_num2char(const char *p, size_t sz)
int i;
i = mandoc_strntoi(p, sz, 10);
- return(i >= 0 && i < 256 ? i : -1);
+ return i >= 0 && i < 256 ? i : -1;
}
int
@@ -123,7 +123,7 @@ mchars_num2uc(const char *p, size_t sz)
i = mandoc_strntoi(p, sz, 16);
assert(i >= 0 && i <= 0x10FFFF);
- return(i);
+ return i;
}
const char *
@@ -135,11 +135,11 @@ mchars_spec2str(const struct mchars *arg,
ln = find(arg, p, sz);
if (ln == NULL) {
*rsz = 1;
- return(sz == 1 ? p : NULL);
+ return sz == 1 ? p : NULL;
}
*rsz = strlen(ln->ascii);
- return(ln->ascii);
+ return ln->ascii;
}
const char *
@@ -149,8 +149,8 @@ mchars_uc2str(int uc)
for (i = 0; i < LINES_MAX; i++)
if (uc == lines[i].unicode)
- return(lines[i].ascii);
- return("<?>");
+ return lines[i].ascii;
+ return "<?>";
}
static const struct ln *
@@ -162,14 +162,14 @@ find(const struct mchars *tab, const char *p, size_t sz)
assert(p);
if (0 == sz || p[0] < PRINT_LO || p[0] > PRINT_HI)
- return(NULL);
+ return NULL;
hash = (int)p[0] - PRINT_LO;
for (pp = tab->htab[hash]; pp; pp = pp->next)
if (0 == strncmp(pp->code, p, sz) &&
'\0' == pp->code[(int)sz])
- return(pp);
+ return pp;
- return(NULL);
+ return NULL;
}