From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 2141D202D7; Sun, 5 Mar 2017 23:21:32 +0000 (UTC) From: Eric Wong To: kcar-public@bogomips.org Cc: Eric Wong Subject: [PATCH] shorten and improve readability of assertion Date: Sun, 5 Mar 2017 23:21:32 +0000 Message-Id: <20170305232132.22437-1-kcar-public@bogomips.org> List-Id: From: Eric Wong --- 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