search for: parse_unsigned_long

Displaying 4 results from an estimated 4 matches for "parse_unsigned_long".

2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On 9/23/19 12:52 PM, Richard W.M. Jones wrote: > On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote: >>> + int nbdkit_parse_long (const char *what, const char *str, long *r); >>> + int nbdkit_parse_unsigned_long (const char *what, >>> + const char *str, unsigned long *r); >> >> Do we really want to encourage the use of parse_long and >> parse_unsigned_long? Those differ between 32- and 64-bit platforms, at >> which point, it's often bett...
2019 Sep 23
0
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...+similar. > + > + int nbdkit_parse_int (const char *what, const char *str, int *r); > + int nbdkit_parse_unsigned (const char *what, > + const char *str, unsigned *r); > + int nbdkit_parse_long (const char *what, const char *str, long *r); > + int nbdkit_parse_unsigned_long (const char *what, > + const char *str, unsigned long *r); Do we really want to encourage the use of parse_long and parse_unsigned_long? Those differ between 32- and 64-bit platforms, at which point, it's often better to explicitly call out the intended size...
2019 Sep 23
2
Re: [PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
On Mon, Sep 23, 2019 at 12:05:11PM -0500, Eric Blake wrote: > > + int nbdkit_parse_long (const char *what, const char *str, long *r); > > + int nbdkit_parse_unsigned_long (const char *what, > > + const char *str, unsigned long *r); > > Do we really want to encourage the use of parse_long and > parse_unsigned_long? Those differ between 32- and 64-bit platforms, at > which point, it's often better to explicitly c...
2019 Sep 21
2
[PATCH nbdkit] server: public: Add nbdkit_parse_* functions for safely parsing integers.
...(3)>, L<atoi(3)> and +similar. + + int nbdkit_parse_int (const char *what, const char *str, int *r); + int nbdkit_parse_unsigned (const char *what, + const char *str, unsigned *r); + int nbdkit_parse_long (const char *what, const char *str, long *r); + int nbdkit_parse_unsigned_long (const char *what, + const char *str, unsigned long *r); + int nbdkit_parse_int16_t (const char *what, + const char *str, int16_t *r); + int nbdkit_parse_uint16_t (const char *what, + const char *str, uint16_t *r);...