From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f43.google.com (mail-pa0-f43.google.com [209.85.220.43]) by dpdk.org (Postfix) with ESMTP id BFA8F255 for ; Mon, 26 Jan 2015 14:48:20 +0100 (CET) Received: by mail-pa0-f43.google.com with SMTP id eu11so11838002pac.2 for ; Mon, 26 Jan 2015 05:48:19 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=1BlGHqoDC7hMYtOewkQfp0Eejngl9ej25NqUKYoNqt0=; b=P9HSprmYSzQXVyEc+MU+EZQzwRpO1LyaFeTBorOYj7e9cLI1lX34km5W2FxIi8WO8X hoS9OcChyD25xiBOEW/jz/WHPtO+Jbs/QRQS0rj4NaTm7ll4VHBMKGgGve5TVUoXEUij Bz/ii+cw+kc1AAD7wYF2iIk4lsDfTXzHIOcf+X9NyKjdXVtUFpSy0bvayNW7TYCAqzw6 Sq3W5iMQnLc3cD0PZpKREn74zmGVitFDA8eQHP+VQFqrfCOpZMjY9pBx/HpN7Xi5pF3/ HrXZ2naf1QfUPXI+uUbu7YJTP9xptez8knGJm46hO0wuLNBwWytLhVm9lZkLcq4A9CyJ 3wJA== X-Gm-Message-State: ALoCoQkH3mVl/6MYfc3TpXqJY6RRcU1v+N9QeEZo6TBKpjOMZqHrWrGsFMhA8plz2JNDm1rEfXId X-Received: by 10.66.141.5 with SMTP id rk5mr5193974pab.112.1422280099515; Mon, 26 Jan 2015 05:48:19 -0800 (PST) Received: from uryu.home.lan ([144.49.132.22]) by mx.google.com with ESMTPSA id q10sm9794810pdm.78.2015.01.26.05.48.17 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jan 2015 05:48:19 -0800 (PST) Date: Mon, 26 Jan 2015 13:48:09 +0000 From: Stephen Hemminger To: Cunming Liang Message-ID: <20150126134809.1ba70e90@uryu.home.lan> In-Reply-To: <1421914598-2747-10-git-send-email-cunming.liang@intel.com> References: <1417589628-43666-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-1-git-send-email-cunming.liang@intel.com> <1421914598-2747-10-git-send-email-cunming.liang@intel.com> X-Mailer: Claws Mail 3.11.1 (GTK+ 2.24.25; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v1 09/15] malloc: fix the issue of SOCKET_ID_ANY X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jan 2015 13:48:21 -0000 On Thu, 22 Jan 2015 16:16:32 +0800 Cunming Liang wrote: > - return rte_socket_id(); > + unsigned socket_id = rte_socket_id(); > + > + if (socket_id == (unsigned)SOCKET_ID_ANY) I prefer not casting -1 to unsigned it will cause warnings. It is better to make socket_id an integer and then have the implicit cast in the return