aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/preconv.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
commitb6d8272551435098c716c546a5201206517e5da9 (patch)
tree223438db91511a96151bc1450143b4c649c40d08 /preconv.c
parenteec76d50a016de5e9c4e0d3504b148892a36aabf (diff)
downloadmandoc-b6d8272551435098c716c546a5201206517e5da9.tar.gz
mandoc-b6d8272551435098c716c546a5201206517e5da9.tar.zst
mandoc-b6d8272551435098c716c546a5201206517e5da9.zip
modernize style: "return" is not a function
Diffstat (limited to 'preconv.c')
-rw-r--r--preconv.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/preconv.c b/preconv.c
index 87e65ea0..1fc137a9 100644
--- a/preconv.c
+++ b/preconv.c
@@ -1,4 +1,4 @@
-/* $Id: preconv.c,v 1.14 2015/03/06 09:24:59 kristaps Exp $ */
+/* $Id: preconv.c,v 1.15 2015/10/06 18:32:19 schwarze Exp $ */
/*
* Copyright (c) 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -92,17 +92,17 @@ preconv_encode(struct buf *ib, size_t *ii, struct buf *ob, size_t *oi,
*oi += snprintf(ob->buf + *oi, 11, "\\[u%.4X]", accum);
*ii = (char *)cu - ib->buf;
*filenc &= ~MPARSE_LATIN1;
- return(1);
+ return 1;
latin:
if ( ! (*filenc & MPARSE_LATIN1))
- return(0);
+ return 0;
*oi += snprintf(ob->buf + *oi, 11,
"\\[u%.4X]", (unsigned char)ib->buf[(*ii)++]);
*filenc &= ~MPARSE_UTF8;
- return(1);
+ return 1;
}
int
@@ -123,7 +123,7 @@ preconv_cue(const struct buf *b, size_t offset)
if ((sz = (size_t)(eoln - ln)) < 10 ||
memcmp(ln, ".\\\" -*-", 7) || memcmp(eoln - 3, "-*-", 3))
- return(MPARSE_UTF8 | MPARSE_LATIN1);
+ return MPARSE_UTF8 | MPARSE_LATIN1;
/* Move after the header and adjust for the trailer. */
@@ -162,15 +162,15 @@ preconv_cue(const struct buf *b, size_t offset)
sz--;
}
if (0 == sz)
- return(0);
+ return 0;
/* Check us against known encodings. */
if (phsz > 4 && !strncasecmp(ln, "utf-8", 5))
- return(MPARSE_UTF8);
+ return MPARSE_UTF8;
if (phsz > 10 && !strncasecmp(ln, "iso-latin-1", 11))
- return(MPARSE_LATIN1);
- return(0);
+ return MPARSE_LATIN1;
+ return 0;
}
- return(MPARSE_UTF8 | MPARSE_LATIN1);
+ return MPARSE_UTF8 | MPARSE_LATIN1;
}