+/* SPDX-License-Identifier: LGPL-2.1+ */
/***
This file is part of systemd.
return -EBADMSG;
}
+ /* Note that after processing the SD_LLDP_TYPE_END left could still be > 0
+ * as the message may contain padding (see IEEE 802.1AB-2016, sec. 8.5.12) */
+
goto end_marker;
case SD_LLDP_TYPE_CHASSIS_ID:
if (r < 0)
return r;
- *ret = n;
- n = NULL;
+ *ret = TAKE_PTR(n);
return r;
}