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 C6870A328D for ; Tue, 22 Oct 2019 18:34:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7DA9B1BF0F; Tue, 22 Oct 2019 18:34:28 +0200 (CEST) Received: from mail-pg1-f193.google.com (mail-pg1-f193.google.com [209.85.215.193]) by dpdk.org (Postfix) with ESMTP id E22321BEED for ; Tue, 22 Oct 2019 18:34:26 +0200 (CEST) Received: by mail-pg1-f193.google.com with SMTP id k20so10288616pgi.1 for ; Tue, 22 Oct 2019 09:34:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JDOI/jXyFvSwT6LAHQhCPBBwvZADbsT/T5uRpz0WGn4=; b=jDCWHL9ap9E9wD9AMLzoTMUX1bXHYLcLp7RQRvH85uaA+1tIp+ES9B2bzpka28H1RH CsSa2ZCt7rAWwicjw40Af46Q4EYvrtBjDOkj67Ehgs4AXZq6k5Db9OLXtT+CqpiXFNSb RgXP4abxBQ7uLx/Y+aHAna5V5LCsP9wwG+g3DrsynISKpuqpWyV6TG9wtrbUfcoYxImE P+b9OYExrkFfptywg3lv/wuRgsGLxn6NUmouSIIPQiwQj4PexpeSa0YkUzVDgIzCZvE3 LH0FoPg9Tb4LdsP08GUSuBa5eZ3rwCUOz7km3XtBybY9neRMKzICW4a7SZahKAMt+XlZ wjYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JDOI/jXyFvSwT6LAHQhCPBBwvZADbsT/T5uRpz0WGn4=; b=UmDd6pTb0KKL1HBeRVIXMfguFtrxMdWAvOFv6W5pT96KRBHbnlh+rcocnEAcbILKkY sE1zLVYArsc1q+0+YiTKsQxMUET9rtaH/yCxtqZFBPk4gnTaD+kBoaOw9+ZHlF6PvJ6B YGaNNxMVbXsqASxK77Ea2D1ITzgw45ZSxYXG9SvamrRcQsRhquWpSdNhCLxqqhhtOoBl 7FbnPseUTItTbilegSwgym/Zv9Cz3/AJ6s2NMF0IHpenQFU0Lzc3obhsMNjE6OY9J9I9 M+WRVZLH2vsGsQW64mYikGO4COGA2fyBCnIzuhWmj7B0ZEQxrSztk/CGUBULen9Dlj3H OmKg== X-Gm-Message-State: APjAAAW+Q+mjmRiY9RDFTJcMbjR7SKZpSap2esdxrEJkPFujAqjgnDMR Zi+MerlDgJW+J0zegslObiGH9+bLgmbqnQ== X-Google-Smtp-Source: APXvYqxP8hMuLAhQ31rqNnhSP52b4KAGSSjqh3qg1dSFr5QJYh2a+Vimbx1fkPx9bD8WLvq629rvXg== X-Received: by 2002:a17:90a:f84:: with SMTP id 4mr3441798pjz.110.1571762065937; Tue, 22 Oct 2019 09:34:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id 64sm20377714pfx.31.2019.10.22.09.34.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 09:34:25 -0700 (PDT) Date: Tue, 22 Oct 2019 09:34:19 -0700 From: Stephen Hemminger To: David Marchand Cc: dev@dpdk.org, anatoly.burakov@intel.com, thomas@monjalon.net, John Griffin , Fiona Trahe , Deepak Kumar Jain Message-ID: <20191022093338.6c0b0828@hermes.lan> In-Reply-To: <1571736761-32134-8-git-send-email-david.marchand@redhat.com> References: <1571736761-32134-1-git-send-email-david.marchand@redhat.com> <1571736761-32134-8-git-send-email-david.marchand@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit 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, 22 Oct 2019 11:32:40 +0200 David Marchand wrote: > + if (f == NULL) { > + f = default_log_stream; > + if (f == 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 value > + * of stderr, even if the application closes and > + * reopens it. > + */ > + f = stderr; > + } > + } > + return f; Why not just the short form? return default_log_stream ? : stderr;