[systemd-devel] [PATCH] networkd: send hostname to dhcp server

Tom Gundersen teg at jklm.no
Mon Jun 30 23:43:32 PDT 2014


On Tue, Jul 1, 2014 at 2:36 AM, Eugene Yakubovich
<eugene.yakubovich at coreos.com> wrote:
> On Mon, Jun 30, 2014 at 5:09 PM, Greg KH <gregkh at linuxfoundation.org> wrote:
>>
>> > +/* make sure the hostname is not "localhost" */
>> > +static bool is_localhost(const char *hostname) {
>> > +        char *hostend;
>> > +
>> > +        assert(hostname);
>>
>> You only call this in one place, with an array on the stack, so it can
>> never be NULL.  So why check this at all?
>>
>> Other than that minor nit, this looks good, thanks for adding it.
>
>
> I was thinking that this function might be called in the future in other
> places as well so
> it doesn't hurt to check.

Sounds fair enough. Better safe than sorry.

> But I can nuke the assert.
>
> -Eugene
>
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel
>


More information about the systemd-devel mailing list