From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1FBB0A328D for ; Tue, 22 Oct 2019 18:50:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD3151BF4F; Tue, 22 Oct 2019 18:50:46 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id 6839A1BF33 for ; Tue, 22 Oct 2019 18:50:43 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1571763042; 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=CpYb/+CN5APE6XW2ObB8pjcbliOLwv1+30tBmZvt13U=; b=RVGDsQTbn3LZ2AxVrtdL5pXrAyEXJ868IR43zYAiMnxagwEpaMXCG/DalpP6OMLYbEOag6 7wJd3X2XOri1AQLW6d9fvV4rB60EXqhbu9LszTFw3D+LqoRi3kfPwqBAcgjES0gEeo2Wd6 gDj7BiQAyQbKSLPfkS1/JG60v1lb1wA= Received: from mail-vk1-f200.google.com (mail-vk1-f200.google.com [209.85.221.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-191--1CXaAWzOZ2udlyLuozWUg-1; Tue, 22 Oct 2019 12:50:39 -0400 Received: by mail-vk1-f200.google.com with SMTP id u64so7791152vke.18 for ; Tue, 22 Oct 2019 09:50:39 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=0dKRUAuGIlwaqRHT9BTmr/GgNu6X6hDEpJOLULL9NbI=; b=di3jNYj4ylukEoqxr4ZaWsjvToevA8+tcQ8MXj21PYTOM+6S+BNP1yYnF+W32QXKG8 eKHb3o31EAk/V1jZ0Iicv16xw6TpVqERxcaa9nieBRgdiJVpk2j498WmIetui/qmDsf8 z0ToLhkH0niyQtxQ11aaQUDm6SHRyaqnJ3U0BviQhLK0zkWRhEbfqfLU1Oo5AXanO7zg XdPf5qASzIuGnkKhwax//c+6jN1cn2YH9L/hJDRlX80+ckDeIzi2E4BZlB+6Wq4LnZM5 Cc6OzQ7JahjWFvPztFsCnAqmwW0lMPslMHKgFgq1zLSHC3HAPtjRO55hS1YKhiLtFZWD J2Pg== X-Gm-Message-State: APjAAAWbhkE8i2Gt5grfh3cJt177CUZ3V+6+ZdjH0jEQXxLkcAa8LY4N 0XtqGEn5NGifZB8eg0mfqDetaJmc0pPuRRHMY/W7UE2GlVB4W8fEUdw2NcupIHq1Kk54OA1ZT0Q SR+T9hCTHRkEY9IQlR2k= X-Received: by 2002:ab0:5968:: with SMTP id o37mr2693028uad.53.1571763039204; Tue, 22 Oct 2019 09:50:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqxA+O3g4b3tjlC2TCbFz83zaWz6EZYN1rTC0hWu/1ZbKJRuQSGOnQol9LWkQ8duzUHjTshwatu+sNII9wa3ejA= X-Received: by 2002:ab0:5968:: with SMTP id o37mr2693003uad.53.1571763038783; Tue, 22 Oct 2019 09:50:38 -0700 (PDT) MIME-Version: 1.0 References: <1571736761-32134-1-git-send-email-david.marchand@redhat.com> <1571736761-32134-8-git-send-email-david.marchand@redhat.com> <20191022093338.6c0b0828@hermes.lan> In-Reply-To: <20191022093338.6c0b0828@hermes.lan> From: David Marchand Date: Tue, 22 Oct 2019 18:50:27 +0200 Message-ID: To: Stephen Hemminger Cc: dev , "Burakov, Anatoly" , Thomas Monjalon , John Griffin , Fiona Trahe , Deepak Kumar Jain X-MC-Unique: -1CXaAWzOZ2udlyLuozWUg-1 X-Mimecast-Spam-Score: 0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH 7/8] log: add log stream accessor X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 22, 2019 at 6:34 PM Stephen Hemminger wrote: > > On Tue, 22 Oct 2019 11:32:40 +0200 > David Marchand wrote: > > > + if (f =3D=3D NULL) { > > + f =3D default_log_stream; > > + if (f =3D=3D NULL) { > > + /* > > + * Grab the current value of stderr here, rather = than > > + * just initializing default_log_stream to stderr= . This > > + * ensures that we will always use the current va= lue > > + * of stderr, even if the application closes and > > + * reopens it. > > + */ > > + f =3D stderr; > > + } > > + } > > + return f; > > Why not just the short form? > return default_log_stream ? : stderr; > Moved the existing code around, I can use this short form. --=20 David Marchand