From patchwork Tue Jan 24 12:19:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Markus Armbruster X-Patchwork-Id: 13113932 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 60163C25B4E for ; Tue, 24 Jan 2023 12:20:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233709AbjAXMUx (ORCPT ); Tue, 24 Jan 2023 07:20:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232855AbjAXMUv (ORCPT ); Tue, 24 Jan 2023 07:20:51 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 300234523C for ; Tue, 24 Jan 2023 04:19:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674562793; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=ctWn+Rpl9/7CZYq46ObgHTHj3H8gGyQz/9706Nf3Xvg=; b=QGEjQLgaa+/lqlHo1CajjgU5z6cHtiXqpcse7ys4Ttpz+89bsxfLkiTsGXdLGfkX4gn513 eLXqly6DB/1Imrf9LYekEURMKREvlPP+i+wjORNe3mFCPlI5YsR/tIjaxJGqGS1Sq5agyf LrpxXP4WWin4mx2srn9K0mJJ/S5AiO4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-490-41sk5EZeMES1oGP9BB9NtA-1; Tue, 24 Jan 2023 07:19:50 -0500 X-MC-Unique: 41sk5EZeMES1oGP9BB9NtA-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.rdu2.redhat.com [10.11.54.8]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 801AD101A5B4; Tue, 24 Jan 2023 12:19:49 +0000 (UTC) Received: from blackfin.pond.sub.org (unknown [10.39.192.70]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2CD8EC15BA0; Tue, 24 Jan 2023 12:19:49 +0000 (UTC) Received: by blackfin.pond.sub.org (Postfix, from userid 1000) id 8F9C221E6A24; Tue, 24 Jan 2023 13:19:46 +0100 (CET) From: Markus Armbruster To: qemu-devel@nongnu.org Cc: pbonzini@redhat.com, kraxel@redhat.com, kwolf@redhat.com, hreitz@redhat.com, marcandre.lureau@redhat.com, dgilbert@redhat.com, mst@redhat.com, imammedo@redhat.com, ani@anisinha.ca, eduardo@habkost.net, marcel.apfelbaum@gmail.com, philmd@linaro.org, wangyanan55@huawei.com, jasowang@redhat.com, jiri@resnulli.us, berrange@redhat.com, thuth@redhat.com, quintela@redhat.com, stefanb@linux.vnet.ibm.com, stefanha@redhat.com, kvm@vger.kernel.org, qemu-block@nongnu.org Subject: [PATCH 05/32] hmp: Drop redundant argument check from add_completion_option() Date: Tue, 24 Jan 2023 13:19:19 +0100 Message-Id: <20230124121946.1139465-6-armbru@redhat.com> In-Reply-To: <20230124121946.1139465-1-armbru@redhat.com> References: <20230124121946.1139465-1-armbru@redhat.com> MIME-Version: 1.0 Content-type: text/plain X-Scanned-By: MIMEDefang 3.1 on 10.11.54.8 Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org No need to check for null arguments, no caller passes them. Signed-off-by: Markus Armbruster --- monitor/misc.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/monitor/misc.c b/monitor/misc.c index c18a713d9c..d58a81c452 100644 --- a/monitor/misc.c +++ b/monitor/misc.c @@ -1353,9 +1353,6 @@ int get_monitor_def(Monitor *mon, int64_t *pval, const char *name) static void add_completion_option(ReadLineState *rs, const char *str, const char *option) { - if (!str || !option) { - return; - } if (!strncmp(option, str, strlen(str))) { readline_add_completion(rs, option); }