This is nothing interesting to warn about. Also use the symbolic
constant name when testing for this condition.
* number. */
r = netns_get_nsid(/* netnsfd= */ -EBADF, &nsid);
- if (r < 0)
+ if (r < 0 && r != -ENODATA)
log_warning_errno(r, "Failed to query network nsid, ignoring: %m");
return sd_bus_message_append(reply, "u", nsid);
if (r < 0)
return r;
- if (u == UINT32_MAX) /* no NSID assigned yet */
+ if (u == (uint32_t) NETNSA_NSID_NOT_ASSIGNED) /* no NSID assigned yet */
return -ENODATA;
if (ret)