Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 10 Apr 2011 15:28:37 +0000 (UTC)
From:      Mikolaj Golub <trociny@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r220523 - head/sbin/hastd
Message-ID:  <201104101528.p3AFSbOV052266@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trociny
Date: Sun Apr 10 15:28:37 2011
New Revision: 220523
URL: http://svn.freebsd.org/changeset/base/220523

Log:
  In hast_proto_recv() remove unnecessary check. The size is checked
  later in hast_proto_recv_data().
  
  Approved by:	pjd (mentor)
  MFC after:	1 week

Modified:
  head/sbin/hastd/hast_proto.c

Modified: head/sbin/hastd/hast_proto.c
==============================================================================
--- head/sbin/hastd/hast_proto.c	Sun Apr 10 15:21:46 2011	(r220522)
+++ head/sbin/hastd/hast_proto.c	Sun Apr 10 15:28:37 2011	(r220523)
@@ -225,17 +225,12 @@ hast_proto_recv(const struct hast_resour
     struct nv **nvp, void *data, size_t size)
 {
 	struct nv *nv;
-	size_t dsize;
 	int ret;
 
 	ret = hast_proto_recv_hdr(conn, &nv);
 	if (ret < 0)
 		return (ret);
-	dsize = nv_get_uint32(nv, "size");
-	if (dsize == 0)
-		(void)nv_set_error(nv, 0);
-	else
-		ret = hast_proto_recv_data(res, conn, nv, data, size);
+	ret = hast_proto_recv_data(res, conn, nv, data, size);
 	if (ret < 0)
 		nv_free(nv);
 	else



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