Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Mar 2018 15:09:55 +0000 (UTC)
From:      Mariusz Zaborski <oshogbo@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r331118 - head/sys/geom/label
Message-ID:  <201803181509.w2IF9tIv019995@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: oshogbo
Date: Sun Mar 18 15:09:55 2018
New Revision: 331118
URL: https://svnweb.freebsd.org/changeset/base/331118

Log:
  Remove unneeded variable which was introduced in r328472.
  
  Pointed out by:	pjd@

Modified:
  head/sys/geom/label/g_label.c

Modified: head/sys/geom/label/g_label.c
==============================================================================
--- head/sys/geom/label/g_label.c	Sun Mar 18 11:26:07 2018	(r331117)
+++ head/sys/geom/label/g_label.c	Sun Mar 18 15:09:55 2018	(r331118)
@@ -200,7 +200,6 @@ g_label_create(struct gctl_req *req, struct g_class *m
 	struct g_provider *pp2;
 	struct g_consumer *cp;
 	char name[64];
-	int n;
 
 	g_topology_assert();
 
@@ -214,8 +213,7 @@ g_label_create(struct gctl_req *req, struct g_class *m
 	}
 	gp = NULL;
 	cp = NULL;
-	n = snprintf(name, sizeof(name), "%s/%s", dir, label);
-	if (n >= sizeof(name)) {
+	if (snprintf(name, sizeof(name), "%s/%s", dir, label) >= sizeof(name)) {
 		if (req != NULL)
 			gctl_error(req, "Label name %s is too long.", label);
 		return (NULL);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201803181509.w2IF9tIv019995>