[LU-6513] redundant rc check in mgs_setparam Created: 27/Apr/15 Updated: 30/Jan/22 Resolved: 30/Jan/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor |
| Reporter: | Oleg Drokin | Assignee: | WC Triage |
| Resolution: | Not a Bug | Votes: | 0 |
| Labels: | None | ||
| Severity: | 3 |
| Rank (Obsolete): | 9223372036854775807 |
| Description |
|
smatch highlighted this bit in mgs_setparam: rc = mgs_parse_devname(devname, fsname, NULL);
if (rc == 0 && !mgs_parse_devname(devname, NULL, &index)) {
/* param related to llite isn't allowed to set by OST or MDT */
if (rc == 0 && strncmp(param, PARAM_LLITE,
sizeof(PARAM_LLITE) - 1) == 0)
RETURN(-EINVAL);
} else {
So, why do we need this second rc == 0 check? let's take it down to improce clarity, perhaps we can even combine the two if statements ? |