From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5F992A0503; Wed, 18 May 2022 17:21:34 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 04C5140156; Wed, 18 May 2022 17:21:34 +0200 (CEST) Received: from mail-pj1-f43.google.com (mail-pj1-f43.google.com [209.85.216.43]) by mails.dpdk.org (Postfix) with ESMTP id 5889F400D6 for ; Wed, 18 May 2022 17:21:33 +0200 (CEST) Received: by mail-pj1-f43.google.com with SMTP id a23-20020a17090acb9700b001df4e9f4870so2402122pju.1 for ; Wed, 18 May 2022 08:21:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=GDIWrWiOIJuYhIYKDhEzbYNHZjVuhe7VleylnzeHaIg=; b=0kbh06DnkPpdSIV+oMW1JsdPD4L+fpSxYRJsObdt8uJC4A7kXPJOI61/E+amnwZ4NF xjHcUxiXHuTohGW4WY1RdlCPvDZruzat46uImry0hiYiSjdcl+8DQO93o09ec2JfjWGy oX69fP5RfUABQwcGaWpMpsQq5JEBXfz6Hunyd7PEEPKf6+NpjRUWzwmiecjZ6932bFrx qnx0BjdeO5/j99BxXCeNxrlMeY3iiZrAew6GehecCvtiPpyca8bf129Fqz5GZkeK5Evo dBQq/lvuvcZqMxJTNSLuEf4CSsxCFxkx5Ln1vqbherim39Oqn9H79vevMkq4pRYEKWgc Ajtw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=GDIWrWiOIJuYhIYKDhEzbYNHZjVuhe7VleylnzeHaIg=; b=k4lSVLm/gobWN/PcecnlU4oYlo6SjKkZcZ3E0P7ONQN3Mv1VCSN4rqBhQ/3VQrs8u7 4PgWLgrbM+S1d5mNGBmr4ybfJr24wMuqeTS3+hiCO9Wbh8jPCHGl3pHOvgaQe2xTUZWx Qkcd8pGbAJN88wKw4m2WXtz8J5N39Dy9z4k7xk9tL+A5tLZmi6lNXyikDdfNT9m1j3vN G5KsvgDHjRhgMsQ0fXIgZs32XHUOiZbmeAMaH59CfJr8VSUdeThK4sSFRVsk1gVsJn4T UnICUpFtTAlSLZ8G5cFPwfa8N1HSsC2UrDUXpUFGLtAUpcC9ZVFiSeRhuZApqWbRWc8V uQUA== X-Gm-Message-State: AOAM5331T7IXogcCknIyGMaZVWW2Z7yNEprp5jyqqcjO8H/bun5bq/P4 5PpW93N7AGrqiXl+1MtMUj00rg== X-Google-Smtp-Source: ABdhPJx/LV9v0NPVYRIFPgANVuqbCQlsBJ5d1tAylFpv2i8In/DnjPrfZGpkUWWoNZkSofMvg7Ruew== X-Received: by 2002:a17:90a:6f06:b0:1df:c19b:627d with SMTP id d6-20020a17090a6f0600b001dfc19b627dmr15638pjk.95.1652887292486; Wed, 18 May 2022 08:21:32 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id n20-20020a170902969400b0015e8d4eb1f6sm1822423plp.64.2022.05.18.08.21.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 May 2022 08:21:31 -0700 (PDT) Date: Wed, 18 May 2022 08:21:29 -0700 From: Stephen Hemminger To: Steve Yang Cc: dev@dpdk.org, yuying.zhang@intel.com, qiming.yang@intel.com, qi.z.zhang@intel.com, mdr@ashroe.eu Subject: Re: [PATCH v1 1/2] net/ice: support dump ice ddp package Message-ID: <20220518082129.747e061f@hermes.local> In-Reply-To: <20220511080247.261043-2-stevex.yang@intel.com> References: <20220511080247.261043-1-stevex.yang@intel.com> <20220511080247.261043-2-stevex.yang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Wed, 11 May 2022 08:02:46 +0000 Steve Yang wrote: > +#define ICE_PKG_COPY_STRING(dst, src) \ > + do {\ > + char *_dst = (dst); \ > + const char *_src = (src); \ > + memset(_dst, SPACE_CHAR, ICE_PKG_NAME_SIZE); \ > + strncpy(_dst, _src, strlen(_src) + 1); \ > + } while (0) Reinventing strlcpy why?