diff options
author | trociny <trociny@FreeBSD.org> | 2011-04-10 15:28:37 +0000 |
---|---|---|
committer | trociny <trociny@FreeBSD.org> | 2011-04-10 15:28:37 +0000 |
commit | cafda9c73f3b757beeea54be85d88029974949cd (patch) | |
tree | c51883a26b10a96053e4b54c58af2af5d17828b2 /sbin/hastd | |
parent | cbdb24d2fbc9008ffc92de086967143e2226a214 (diff) | |
download | FreeBSD-src-cafda9c73f3b757beeea54be85d88029974949cd.zip FreeBSD-src-cafda9c73f3b757beeea54be85d88029974949cd.tar.gz |
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
Diffstat (limited to 'sbin/hastd')
-rw-r--r-- | sbin/hastd/hast_proto.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/sbin/hastd/hast_proto.c b/sbin/hastd/hast_proto.c index 768fb2b..8f53baa 100644 --- a/sbin/hastd/hast_proto.c +++ b/sbin/hastd/hast_proto.c @@ -225,17 +225,12 @@ hast_proto_recv(const struct hast_resource *res, struct proto_conn *conn, 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 |