]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
confile_utils: cleanup new_hwaddr()
authorChristian Brauner <christian.brauner@ubuntu.com>
Wed, 9 Dec 2020 09:00:40 +0000 (10:00 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Thu, 10 Dec 2020 19:39:53 +0000 (20:39 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/confile_utils.c

index 34ea92345fa98f74d61f1ae51777cd0995d1a59c..d98b5cd9c6d0b9f06011ba7f139f2171b1d71357 100644 (file)
@@ -778,8 +778,7 @@ bool new_hwaddr(char *hwaddr)
                       rand() % 255, rand() % 255);
 #endif
        if (ret < 0 || ret >= 18) {
-               SYSERROR("Failed to call snprintf()");
-               return false;
+               return log_error_errno(false, EIO, "Failed to call snprintf()");
        }
 
        return true;