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

Eugene Yakubovich eugene.yakubovich at coreos.com
Mon Jun 30 17:36:57 PDT 2014


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. But I can nuke the assert.

-Eugene
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20140630/7f1a88c4/attachment.html>


More information about the systemd-devel mailing list