Details
-
Bug
-
Resolution: Duplicate
-
Minor
-
None
-
None
-
None
-
3
-
15140
Description
/** * lustre_msg_buflen - return the length of buffer \a n in message \a m * \param m lustre_msg (request or reply) to look at * \param n message index (base 0) * * returns zero for non-existent message indices */ int lustre_msg_buflen(struct lustre_msg *m, int n) { switch (m->lm_magic) { case LUSTRE_MSG_MAGIC_V2: return lustre_msg_buflen_v2(m, n); default: CERROR("incorrect message magic: %08x\n", m->lm_magic); return -EINVAL; } }
According comments it should return zero but actually it return -EINVAL.
And this error is never checked.