[Bug 224845] Change return type to size_t.
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue Jan 2 18:29:35 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224845
Bug ID: 224845
Summary: Change return type to size_t.
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: bin
Assignee: freebsd-bugs at FreeBSD.org
Reporter: bltsrc at mail.ru
r326025
/bin/dd/args.c
static uintmax_t get_num(const char *val)
type SIZE_T would be more appropriate as a return value,
because size_t could include largest size of any object.
uintmax_t on the other hand may be one of extended integer types(if
implemented, for example, 128bit number on x64), so exists possibility, that no
object could have that much size,
so its more than needed, size_t would serve better in this case.
Indeed, analogous function that does the same
static size_t get_bsz(char *val)
in OpenBSD's dd has return type size_t;
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list