RETURN(rc);
}
- if (strlen(name) == 0) {
+ if (name[0] == 0) { /* strlen(name) == 0 */
/* Only getattr on the child. Parent is on another node. */
mdt_set_disposition(info, ldlm_rep, DISP_LOOKUP_POS);
child = parent;
switch (info->mti_attr.ma_attr.la_mode & S_IFMT) {
case S_IFREG:
case S_IFDIR:{
- if (strlen(info->mti_rr.rr_name) == 0) {
+ if (info->mti_rr.rr_name[0] == 0) {
rc = mdt_md_mkobj(info);
break;
}
if (!ma->ma_lmm || !ma->ma_cookie)
GOTO(out_unlock_parent, rc = -EINVAL);
- if (strlen(rr->rr_name) == 0) {
+ if (rr->rr_name[0] == 0) {
/* remote partial operation
* It is possible that replay can happen on parent MDS
* and this operation will be repeated.