> -----Original Message-----
> From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Mattias Rönnblom
> Sent: Wednesday, November 29, 2017 9:29 AM
> To: Mcnamara, John <john.mcnam...@intel.com>
> Cc: dev@dpdk.org; Mattias Rönnblom <hof...@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 <hof...@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 via email to