From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 68C0AC433EF for ; Mon, 6 Dec 2021 15:48:23 +0000 (UTC) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 043A83C240F for ; Mon, 6 Dec 2021 16:48:21 +0100 (CET) Received: from in-4.smtp.seeweb.it (in-4.smtp.seeweb.it [IPv6:2001:4b78:1:20::4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 6B10B3C02F7 for ; Mon, 6 Dec 2021 16:48:10 +0100 (CET) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-4.smtp.seeweb.it (Postfix) with ESMTPS id DB3AB1000A13 for ; Mon, 6 Dec 2021 16:48:09 +0100 (CET) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id F245C1FD2F; Mon, 6 Dec 2021 15:48:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1638805688; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sZ6xhb/+c6oB215dFtdF96JYDc1sx92jydCj7IGybJY=; b=A+XTkL7ycXu9fUU6n5t2E/VBmsMO5ARg3qhKKFI8/DzIpgZ1X8Uf0O/jQ0pUDhfiWEcSLF yu5FSAMT8tDdGMCcyqWSByzrPBeqDAHvMw6HT+4Wraum+8Zt8vsatZ4MG5BbPhPCMxP57/ tivHpX2VmmRGxqCpbbSTb484CB+/1Ro= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1638805688; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=sZ6xhb/+c6oB215dFtdF96JYDc1sx92jydCj7IGybJY=; b=jf7aKeAeudBiTyAVrbmAoC/su1Sdc+01M9RRBKSF43P4NnyGz/5TZbsaqQ2SGXLM/jHfdz t4IXa/q9jbNzv1BQ== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id A4E6313C4C; Mon, 6 Dec 2021 15:48:08 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sc68JbgwrmGWXwAAMHmgww (envelope-from ); Mon, 06 Dec 2021 15:48:08 +0000 Date: Mon, 6 Dec 2021 16:49:23 +0100 From: Cyril Hrubis To: Richard Palethorpe Message-ID: References: <20211201162401.12725-1-rpalethorpe@suse.com> <20211201162401.12725-2-rpalethorpe@suse.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20211201162401.12725-2-rpalethorpe@suse.com> X-Virus-Scanned: clamav-milter 0.102.4 at in-4.smtp.seeweb.it X-Virus-Status: Clean Subject: Re: [LTP] [PATCH 2/2] check: Add LTP-005 null termination check on test.tags X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: ltp@lists.linux.it Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ltp-bounces+ltp=archiver.kernel.org@lists.linux.it Sender: "ltp" Hi! > This does not explicitly check for zero at the end of an array. For > one thing the zero is implicit when one writes '{}'. We just get an > empty expression list. When one writes '{NULL, 0}', we get an implicit I would vote for dropping the part that checks for implicit cats so that we unify all code on {} for sentinels. I guess that all we would have to do is to drop the loop and only check if the list is empty. Other than that the code looks good to me: Reviewed-by: Cyril Hrubis -- Cyril Hrubis chrubis@suse.cz -- Mailing list info: https://lists.linux.it/listinfo/ltp