[systemd-devel] [PATCH v2 05/26] dhcp: Add option appending and parsing
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Wed Nov 27 07:08:49 PST 2013
On Wed, Nov 27, 2013 at 04:51:42PM +0200, Patrik Flykt wrote:
> On Tue, 2013-11-26 at 00:08 +0100, Lennart Poettering wrote:
> > On Mon, 25.11.13 09:13, Patrik Flykt (patrik.flykt at linux.intel.com) wrote:
> > > +static int parse_options(uint8_t *buf, int32_t buflen, int *overload,
> >
> > ^^^^^^ const missing?
>
> Here the idea was to go over the whole buffer and calling the callback
> with the proper code, len and value. Start of 'buf', i.e. 'code' in the
> function, needs to be advanced to the next option, so its not a const
> value.
It's the uint8_t's that are supposed to be const, not the pointer.
I.e. 'const uint8_t *buf', not 'uint8_t* const buf'.
Zbyszek
More information about the systemd-devel
mailing list