Use empty() since it should be prefered as it has, following the
standard, a constant time complexity regardless of the containter
type. The same is not guaranteed for size().
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
for (iter = attrset.begin(); iter != attrset.end(); ++iter) {
write_op.setxattr(iter->first.c_str(), iter->second);
}
- if (omap.size()) {
+ if (!omap.empty()) {
write_op.omap_set(omap);
}
ret = target_ctx.operate(target_oid, &write_op);
if (ret < 0)
goto err;
- if (!omap.size())
+ if (omap.empty())
break;
ret = target_ctx.omap_set(target_oid, omap);