public inbox for libc-help@sourceware.org
 help / color / mirror / Atom feed
* Why is st_size defined as a signed int?
@ 2021-04-27 14:01 Peng Yu
  2021-04-27 16:06 ` Mike Frysinger
  2021-04-27 17:05 ` Andrew Bell
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Yu @ 2021-04-27 14:01 UTC (permalink / raw)
  To: libc-help

Hi,

https://github.com/bminor/glibc/blob/master/bits/stat.h#L47

I see st_size is defined as __off_t, which should be a signed int. But
can a file size be negative. If not, why not use an unsigned int to
represent the file size? Thanks.

-- 
Regards,
Peng

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

end of thread, other threads:[~2021-04-27 17:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-27 14:01 Why is st_size defined as a signed int? Peng Yu
2021-04-27 16:06 ` Mike Frysinger
2021-04-27 17:05 ` Andrew Bell

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 read-only IMAP folder(s) and NNTP newsgroup(s).