DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Kovacevic, Marko" <marko.kovacevic@intel.com>
To: "Mattias Rönnblom" <hofors@lysator.liu.se>,
	"Mcnamara, John" <john.mcnamara@intel.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH] doc: fix issues in metrics example
Date: Tue, 12 Dec 2017 14:45:44 +0000	[thread overview]
Message-ID: <6DC05C7C5F25994B81B3F2F214251F663290B9@IRSMSX104.ger.corp.intel.com> (raw)
In-Reply-To: <1511947742-16839-1-git-send-email-hofors@lysator.liu.se>



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Mattias Rönnblom
> Sent: Wednesday, November 29, 2017 9:29 AM
> To: Mcnamara, John <john.mcnamara@intel.com>
> Cc: dev@dpdk.org; Mattias Rönnblom <hofors@lysator.liu.se>
> Subject: [dpdk-dev] [PATCH] doc: fix issues in metrics example
> 
> The metrics example didn't retrieve the metrics' names, and also had some more
> minor issues with repetitive error handling code and missing variable
> declarations.
> 
> Signed-off-by: Mattias Rönnblom <hofors@lysator.liu.se>

Would it be more beneficial to keep the return in these two cases as not to do two jumps to go out instead of just one
And to remove the out: ; at the very end completely.

if (len == 0) {
-            printf("No metrics to display (none have been registered)\n");
-            return;
+            printf("Cannot get metrics count.\n");
+            goto out;
+        } else if (len == 0) {
+            printf("No metrics to display (none have been registered).\n");
+            goto out;
         }

      reply	other threads:[~2017-12-12 14:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-29  9:29 Mattias Rönnblom
2017-12-12 14:45 ` Kovacevic, Marko [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=6DC05C7C5F25994B81B3F2F214251F663290B9@IRSMSX104.ger.corp.intel.com \
    --to=marko.kovacevic@intel.com \
    --cc=dev@dpdk.org \
    --cc=hofors@lysator.liu.se \
    --cc=john.mcnamara@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).