The strstr fix is in already. You can fix up the 0 ending thing.

On Tue, Nov 10, 2015 at 8:33 AM, Barret Rhoden <[email protected]> wrote:

> On 2015-11-10 at 08:11 "'Davide Libenzi' via Akaros"
> <[email protected]> wrote:
> > On Tue, Nov 10, 2015 at 7:59 AM, Barret Rhoden <[email protected]>
> > wrote:
> >
> > > Two checkpatch complaints:
> > >
> >
> > Fixed those. Same branch.
>
> Thanks for the changes.
>
> +       strlcpy(boot_cmdline, cmdln, sizeof(boot_cmdline));
> +       boot_cmdline[sizeof(boot_cmdline) - 1] = 0;
>
> we don't need to set boot_cmdline[last] = 0, since strlcpy does that.
> I can touch that up, so no need to worry about it.
>
> But... sorry, I missed something else the first time around:
>
> > -char *strstr(char *s1, char *s2)
> > +const char *strstr(const char *s1, const char *s2)
> >  {
> > -   char *p;
> > +   const char *p;
> >     int f, n;
> >
> >     f = s2[0];
>
> This throws some warnings when compiling:
>
> kern/src/net/ethermedium.c: In function 'etherbind':
> kern/src/net/ethermedium.c:242:6: warning: assignment discards 'const'
> qualifier from pointer target type
>   ptr = strstr(buf, "addr: ");
>       ^
>   CC      kern/src/process.o
> kern/src/net/ethermedium.c:248:6: warning: assignment discards 'const'
> qualifier from pointer target type
>   ptr = strstr(buf, "mbps: ");
>       ^
> kern/src/net/ethermedium.c:256:6: warning: assignment discards 'const'
> qualifier from pointer target type
>   ptr = strstr(buf, "feat: ");
>       ^
>
> From glancing at the man page, I think strstr isn't supposed to return
> a const char*.  Any particular need for that?
>
> As a side note, we can separate out the strstr change into another
> commit, since it's not really part of the "logical change" that is the
> multiboot stuff.
>
> Barret
>
> --
> You received this message because you are subscribed to the Google Groups
> "Akaros" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Akaros" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to