From: pschwan Date: Sun, 26 May 2002 21:39:24 +0000 (+0000) Subject: - LBUG() on failed niobuf allocation X-Git-Tag: 0.4.2~236 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=5f4bf0ef41ea991ef6211feba1cb25e6c3b9bac3;p=fs%2Flustre-release.git - LBUG() on failed niobuf allocation - Fix uninitialized variable mistake --- diff --git a/lustre/ptlrpc/niobuf.c b/lustre/ptlrpc/niobuf.c index f87f1a0..584cbf9 100644 --- a/lustre/ptlrpc/niobuf.c +++ b/lustre/ptlrpc/niobuf.c @@ -277,8 +277,10 @@ int ptl_send_rpc(struct ptlrpc_request *request) OBD_FREE(request->rq_reply_md.start, request->rq_replen); OBD_ALLOC(repbuf, request->rq_replen); - if (!repbuf) + if (!repbuf) { + LBUG(); RETURN(ENOMEM); + } local_id.nid = PTL_ID_ANY; local_id.pid = PTL_ID_ANY; diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index bea410f..e932433 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -62,7 +62,7 @@ int lustre_pack_msg(int count, int *lens, char **bufs, int *len, * with the given sub-buffer lengths. */ int lustre_msg_size(int count, int *lengths) { - int size, i; + int size = 0, i; for (i = 0; i < count; i++) size += size_round(lengths[i]);