* [PATCH] shorten and improve readability of assertion
@ 2017-03-05 23:21 Eric Wong
0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2017-03-05 23:21 UTC (permalink / raw)
To: kcar-public; +Cc: Eric Wong
From: Eric Wong <e@80x24.org>
---
ext/kcar/kcar.rl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ext/kcar/kcar.rl b/ext/kcar/kcar.rl
index d21b243..cbcfa97 100644
--- a/ext/kcar/kcar.rl
+++ b/ext/kcar/kcar.rl
@@ -209,7 +209,7 @@ static void write_cont_value(struct http_parser *hp,
/* normalize tab to space */
if (cont_len > 0) {
- assert((' ' == *vptr || '\t' == *vptr) && "invalid leading white space");
+ assert(is_lws(*vptr) && "invalid leading white space");
*vptr = ' ';
}
for (end = len - 1; end >= 0 && is_lws(vptr[end]); end--);
--
EW
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2017-03-05 23:21 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-05 23:21 [PATCH] shorten and improve readability of assertion Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/kcar.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).