mailing list of musl libc
 help / color / mirror / code / Atom feed
* src/stdio/__stdio_read.c
@ 2012-11-16  7:40 Yuri Kozlov
  2012-11-16  9:29 ` src/stdio/__stdio_read.c Szabolcs Nagy
  0 siblings, 1 reply; 3+ messages in thread
From: Yuri Kozlov @ 2012-11-16  7:40 UTC (permalink / raw)
  To: musl

Hello.

size_t __stdio_read(FILE *f, unsigned char *buf, size_t len)
{
	ssize_t cnt;
...
	cnt = syscall(SYS_readv, ...)

	if (cnt <= 0) {
		f->flags |= F_EOF ^ ((F_ERR^F_EOF) & cnt);
		f->rpos = f->rend = 0;
		return cnt;
	}
...
}

It not raise a problem when a signed value return as unsigned?

-- 
Best Regards,
Yuri Kozlov



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-16 19:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-16  7:40 src/stdio/__stdio_read.c Yuri Kozlov
2012-11-16  9:29 ` src/stdio/__stdio_read.c Szabolcs Nagy
2012-11-16 19:01   ` src/stdio/__stdio_read.c Rich Felker

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).