From: "wangjianjian (C)" <wangjianjian3@huawei.com>
To: "musl@lists.openwall.com" <musl@lists.openwall.com>
Subject: [PATCH V2 1/1] ungetc: Cast to unsigned char before returning
Date: Sun, 20 Oct 2019 04:43:02 +0000 [thread overview]
Message-ID: <87f051899d0a49f1aa66f5a39c2a9100@huawei.com> (raw)
Per Posix and ISO-C standard, casting to unsigned char is needed before
returning.
Signed-off-by: Wang Jianjian <wangjianjian3@huawei.com>
---
src/stdio/ungetc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/stdio/ungetc.c b/src/stdio/ungetc.c
index 180673a4..bc629d4c 100644
--- a/src/stdio/ungetc.c
+++ b/src/stdio/ungetc.c
@@ -16,5 +16,5 @@ int ungetc(int c, FILE *f)
f->flags &= ~F_EOF;
FUNLOCK(f);
- return c;
+ return (unsigned char)c;
}
--
2.17.1
BR,
Wang Jianjian
reply other threads:[~2019-10-20 4:43 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87f051899d0a49f1aa66f5a39c2a9100@huawei.com \
--to=wangjianjian3@huawei.com \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).