Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jul 2017 14:51:32 +0000 (UTC)
From:      Alan Somers <asomers@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r320914 - head/contrib/netbsd-tests/lib/libc/gen
Message-ID:  <201707121451.v6CEpW0p022777@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: asomers
Date: Wed Jul 12 14:51:32 2017
New Revision: 320914
URL: https://svnweb.freebsd.org/changeset/base/320914

Log:
  Remove an extraneous strlen from t_setdomainname.c
  
  Reported by:	Coverity
  CID:		1377568
  MFC after:	15 days
  X-MFC-With:	320737
  Sponsored by:	Spectra Logic Corp

Modified:
  head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c

Modified: head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c
==============================================================================
--- head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c	Wed Jul 12 11:40:09 2017	(r320913)
+++ head/contrib/netbsd-tests/lib/libc/gen/t_setdomainname.c	Wed Jul 12 14:51:32 2017	(r320914)
@@ -83,7 +83,7 @@ restore_domain(void)
 		n += r;
 	if (r < 0)
 		err(1, "read");
-	if (setdomainname(domain, strlen(domain)) != 0)
+	if (setdomainname(domain, n) != 0)
 		err(1, "setdomainname");
 	close(fd);
 }



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