[newlib-cygwin] Cygwin: fhandler_pipe: unify format directives
Corinna Vinschen
corinna@sourceware.org
Sun Jan 13 22:16:00 GMT 2019
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=d31f9f9c1327447a04bdded5b8cd23821789f67d
commit d31f9f9c1327447a04bdded5b8cd23821789f67d
Author: Corinna Vinschen <corinna@vinschen.de>
Date: Sun Jan 13 22:30:33 2019 +0100
Cygwin: fhandler_pipe: unify format directives
The format directives in sscanf/__small_sprintf are not
matching. Fix that.
Diff:
---
winsup/cygwin/fhandler_pipe.cc | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/winsup/cygwin/fhandler_pipe.cc b/winsup/cygwin/fhandler_pipe.cc
index eafaa88..c747824 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;
More information about the Cygwin-cvs
mailing list