From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Ahern Subject: Re: [PATCH iproute2-next 2/8] json: add %hhu helpers Date: Tue, 20 Nov 2018 16:18:20 -0700 Message-ID: <94ab531a-27f4-8bc5-ed3e-f792d9b8da6d@gmail.com> References: <20181119230335.11771-1-jakub.kicinski@netronome.com> <20181119230335.11771-3-jakub.kicinski@netronome.com> <20181119171842.1d1e94ad@xeon-e3> <20181119174018.0629445a@cakuba.netronome.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: oss-drivers@netronome.com, netdev@vger.kernel.org To: Jakub Kicinski , Stephen Hemminger Return-path: Received: from mail-pl1-f193.google.com ([209.85.214.193]:35868 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725903AbeKUJuC (ORCPT ); Wed, 21 Nov 2018 04:50:02 -0500 Received: by mail-pl1-f193.google.com with SMTP id y6-v6so2525569plt.3 for ; Tue, 20 Nov 2018 15:18:22 -0800 (PST) In-Reply-To: <20181119174018.0629445a@cakuba.netronome.com> Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: On 11/19/18 6:40 PM, Jakub Kicinski wrote: > On Mon, 19 Nov 2018 17:18:42 -0800, Stephen Hemminger wrote: >>> void jsonw_hu_field(json_writer_t *self, const char *prop, unsigned short num) >>> { >>> jsonw_name(self, prop); >> >> Do you really need this? it turns out that because of C type >> conversions print_uint should just work? > > I wondered about that for a second, but I took the existence of > jsonw_hu_field() etc. as a proof that explicit typing is preferred. > Stephen: you ok with the explicit typing version?