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
This commit is contained in:
Mikolaj Golub 2011-04-10 15:28:37 +00:00
parent 1d521b1cbd
commit a827fe1fdf

View File

@ -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