libsystemd: Fix wrong dlog message format 47/312847/1
authorYunhee Seo <yuni.seo@samsung.com>
Wed, 5 Jun 2024 01:20:51 +0000 (10:20 +0900)
committerYunhee Seo <yuni.seo@samsung.com>
Mon, 17 Jun 2024 04:28:18 +0000 (13:28 +0900)
When applying dlog to libsyscommon, build error occurs
due to incorrect formatting.
To avoid build error, fix wrong message format is necessary.

Change-Id: Ib73e55d7068e4a810dedb5d59a7a78e79fdba3cc
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
src/libsystemd/libsystemd.c

index 0e9725bcaad79b1e72b2222be69a272759513ae2..115bcd5c05b170cf0c39018179d3d5fa824e71f4 100644 (file)
@@ -249,7 +249,7 @@ static int _change_suffix(const char *name,
 
        /* check max len */
        if ((len + strlen(suffix)) >= UNIT_NAME_MAX) {
-               _E("Name is too long:%d", (len + strlen(suffix)));
+               _E("Name is too long:%ld", (len + strlen(suffix)));
                return -ENAMETOOLONG;
        }
 
@@ -325,7 +325,7 @@ static int _systemd_control_unit(const char *name,
                name = new_name;
        } else {
                if (strlen(name) > UNIT_NAME_MAX) {
-                       _E("Invalid name length %d(>%d)", strlen(name), UNIT_NAME_MAX);
+                       _E("Invalid name length %ld(>%d)", strlen(name), UNIT_NAME_MAX);
                        return -EINVAL;
                }
        }