summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2019-01-13 22:30:33 +0100
committerCorinna Vinschen <corinna@vinschen.de>2019-01-13 22:30:33 +0100
commitd31f9f9c1327447a04bdded5b8cd23821789f67d (patch)
tree2b26dfbcee7ce551521b5a07fab050c665fe0741
parent9e295a8d193e138808931816f5858761ff08f402 (diff)
downloadcygnal-d31f9f9c1327447a04bdded5b8cd23821789f67d.tar.gz
cygnal-d31f9f9c1327447a04bdded5b8cd23821789f67d.tar.bz2
cygnal-d31f9f9c1327447a04bdded5b8cd23821789f67d.zip
Cygwin: fhandler_pipe: unify format directives
The format directives in sscanf/__small_sprintf are not matching. Fix that.
-rw-r--r--winsup/cygwin/fhandler_pipe.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc
index eafaa8856..c74782416 100644
--- a/winsup/cygwin/fhandler_pipe.cc
+++ b/winsup/cygwin/fhandler_pipe.cc
@@ -73,10 +73,10 @@ fhandler_pipe::open (int flags, mode_t mode)
bool inh;
bool got_one = false;
- if (sscanf (get_name (), "/proc/self/fd/pipe:[%lld]",
+ if (sscanf (get_name (), "/proc/self/fd/pipe:[%llu]",
(long long *) &uniq_id) == 1)
pid = myself->pid;
- else if (sscanf (get_name (), "/proc/%d/fd/pipe:[%lld]",
+ else if (sscanf (get_name (), "/proc/%d/fd/pipe:[%llu]",
&pid, (long long *) &uniq_id) < 2)
{
set_errno (ENOENT);
@@ -184,7 +184,7 @@ fhandler_pipe::ftruncate (off_t length, bool allow_truncate)
char *
fhandler_pipe::get_proc_fd_name (char *buf)
{
- __small_sprintf (buf, "pipe:[%D]", get_plain_ino ());
+ __small_sprintf (buf, "pipe:[%U]", get_plain_ino ());
return buf;
}
@@ -424,7 +424,7 @@ fhandler_pipe::fstat (struct stat *buf)
{
buf->st_dev = FH_PIPE;
if (!(buf->st_ino = get_plain_ino ()))
- sscanf (get_name (), "/proc/%*d/fd/pipe:[%lld]",
+ sscanf (get_name (), "/proc/%*d/fd/pipe:[%llu]",
(long long *) &buf->st_ino);
}
return ret;