aboutsummaryrefslogtreecommitdiff
path: root/pkg/rootless
diff options
context:
space:
mode:
authorSascha Grunert <sgrunert@suse.com>2019-06-20 11:59:30 +0200
committerSascha Grunert <sgrunert@suse.com>2019-06-20 12:03:04 +0200
commit3cf3ccbd776ab456949809b092aa06bb00234ada (patch)
tree4b8ccf30b27438538b1b0a11aa16dddab52a0624 /pkg/rootless
parentb4f9bc868e2f5b3ffc5b7487be9d7b717dd6ae5b (diff)
downloadpodman-3cf3ccbd776ab456949809b092aa06bb00234ada.tar.gz
podman-3cf3ccbd776ab456949809b092aa06bb00234ada.tar.bz2
podman-3cf3ccbd776ab456949809b092aa06bb00234ada.zip
Fix format specifiers in rootless_linux.c
Format `%d` expects argument of type `int`, but the argument has a type of `long int`. Signed-off-by: Sascha Grunert <sgrunert@suse.com>
Diffstat (limited to 'pkg/rootless')
-rw-r--r--pkg/rootless/rootless_linux.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/rootless/rootless_linux.c b/pkg/rootless/rootless_linux.c
index eb62d55e9..8caeeb0fb 100644
--- a/pkg/rootless/rootless_linux.c
+++ b/pkg/rootless/rootless_linux.c
@@ -295,7 +295,7 @@ static void __attribute__((constructor)) init()
uid = geteuid ();
gid = getegid ();
- sprintf (path, "/proc/%d/ns/user", pid);
+ sprintf (path, "/proc/%ld/ns/user", pid);
fd = open (path, O_RDONLY);
if (fd < 0 || setns (fd, 0) < 0)
{
@@ -305,7 +305,7 @@ static void __attribute__((constructor)) init()
close (fd);
/* Errors here cannot be ignored as we already joined a ns. */
- sprintf (path, "/proc/%d/ns/mnt", pid);
+ sprintf (path, "/proc/%ld/ns/mnt", pid);
fd = open (path, O_RDONLY);
if (fd < 0)
{
@@ -316,7 +316,7 @@ static void __attribute__((constructor)) init()
r = setns (fd, 0);
if (r < 0)
{
- fprintf (stderr, "cannot join mount namespace for %d: %s", pid, strerror (errno));
+ fprintf (stderr, "cannot join mount namespace for %ld: %s", pid, strerror (errno));
exit (EXIT_FAILURE);
}
close (fd);