From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: Re: [PATCH v4 1/2] eal: add uevent monitor for hot plug Date: Sun, 3 Sep 2017 09:10:04 -0700 Message-ID: <20170903091004.186a799b@xeon-e3> References: <1498712510-44217-2-git-send-email-jia.guo@intel.com> <1504453785-15735-1-git-send-email-jia.guo@intel.com> <1504453785-15735-2-git-send-email-jia.guo@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: bruce.richardson@intel.com, dev@dpdk.org, gaetan.rivet@6wind.com, shreyansh.jain@nxp.com, jblunck@infradead.org, helin.zhang@intel.com, ferruh.yigit@intel.com, konstantin.ananyev@intel.com, thomas@monjalon.net, jingjing.wu@intel.com To: Jeff Guo Return-path: Received: from mail-pg0-f51.google.com (mail-pg0-f51.google.com [74.125.83.51]) by dpdk.org (Postfix) with ESMTP id 0EE0E325A for ; Sun, 3 Sep 2017 18:10:07 +0200 (CEST) Received: by mail-pg0-f51.google.com with SMTP id b8so12633670pgn.5 for ; Sun, 03 Sep 2017 09:10:07 -0700 (PDT) In-Reply-To: <1504453785-15735-2-git-send-email-jia.guo@intel.com> 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 Sun, 3 Sep 2017 23:49:44 +0800 Jeff Guo wrote: > +int > +rte_eal_uev_fd_new(void) > +{ > + > + int netlink_fd = -1; > + > + netlink_fd = socket(PF Please don't use the "initialize everything" style of programming. Gcc has good detection and warning about uninitalized variables, and this style defeats that.