]> www.infradead.org Git - users/sagi/libnvme.git/commitdiff
examples/mi-conf: Initialise sd_bus_error
authorJeremy Kerr <jk@codeconstruct.com.au>
Mon, 24 Oct 2022 09:58:42 +0000 (17:58 +0800)
committerJeremy Kerr <jk@codeconstruct.com.au>
Mon, 24 Oct 2022 10:02:05 +0000 (18:02 +0800)
The sd_bus methods may return EINVAL if err is not initialised to NULL.

Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au>
examples/mi-conf.c

index cdded52088cc17dec59ef538dc21b959c6212868..6f30c070104afa77a3cce289472ba7f088932148 100644 (file)
@@ -81,8 +81,8 @@ int find_port(nvme_mi_ep_t ep, uint8_t *portp, uint16_t *mtup)
 
 int set_local_mtu(sd_bus *bus, unsigned int net, uint8_t eid, uint32_t mtu)
 {
+       sd_bus_error err = SD_BUS_ERROR_NULL;
        sd_bus_message *resp;
-       sd_bus_error err;
        char *ep_path;
        int rc;