Whamcloud - gitweb
- LBUG() on failed niobuf allocation
authorpschwan <pschwan>
Sun, 26 May 2002 21:39:24 +0000 (21:39 +0000)
committerpschwan <pschwan>
Sun, 26 May 2002 21:39:24 +0000 (21:39 +0000)
- Fix uninitialized variable mistake

lustre/ptlrpc/niobuf.c
lustre/ptlrpc/pack_generic.c

index f87f1a0..584cbf9 100644 (file)
@@ -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;
index bea410f..e932433 100644 (file)
@@ -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]);