Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 23 May 2018 21:16:39 -0700
From:      Eitan Adler <eadler@freebsd.org>
To:        Warner Losh <imp@bsdimp.com>
Cc:        src-committers <src-committers@freebsd.org>, svn-src-all@freebsd.org,  svn-src-head@freebsd.org
Subject:   Re: svn commit: r334077 - in head/sbin/devd: . tests
Message-ID:  <CAF6rxgmZJRewfYOVHr5a==hkn_-Uw5eEq5=Z13k=kv2e95UffA@mail.gmail.com>
In-Reply-To: <CANCZdfphza5xHA5mQP3CHdW7gOEUPSUwd2Nq-tGF69JgFDgcAQ@mail.gmail.com>
References:  <201805230739.w4N7d34c062450@repo.freebsd.org> <CANCZdfphza5xHA5mQP3CHdW7gOEUPSUwd2Nq-tGF69JgFDgcAQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 23 May 2018 at 13:09, Warner Losh <imp@bsdimp.com> wrote:
>
>
> On Wed, May 23, 2018 at 1:39 AM, Eitan Adler <eadler@freebsd.org> wrote:
>>
>> Author: eadler
>> Date: Wed May 23 07:39:02 2018
>> New Revision: 334077
>> URL: https://svnweb.freebsd.org/changeset/base/334077
>>
>> Log:
>>   devd: correct two warnings
>>
>>   - catching a polymorphic type by value
>>   - "output between 16 and 95 bytes into a destination of size 80"
>>
>> Modified:
>>   head/sbin/devd/devd.cc
>>   head/sbin/devd/tests/client_test.c
>>
>> Modified: head/sbin/devd/devd.cc
>>
>> ==============================================================================
>> --- head/sbin/devd/devd.cc      Wed May 23 07:39:00 2018        (r334076)
>> +++ head/sbin/devd/devd.cc      Wed May 23 07:39:02 2018        (r334077)
>> @@ -1087,7 +1087,7 @@ event_loop(void)
>>                                 try {
>>                                         process_event(buffer);
>>                                 }
>> -                               catch (std::length_error e) {
>> +                               catch (const std::length_error& e) {
>>                                         devdlog(LOG_ERR, "Dropping event
>> %s "
>>                                             "due to low memory", buffer);
>>                                 }
>>
>> Modified: head/sbin/devd/tests/client_test.c
>>
>> ==============================================================================
>> --- head/sbin/devd/tests/client_test.c  Wed May 23 07:39:00 2018
>> (r334076)
>> +++ head/sbin/devd/tests/client_test.c  Wed May 23 07:39:02 2018
>> (r334077)
>> @@ -50,7 +50,7 @@ create_two_events(void)
>>         FILE *create_stdout;
>>         FILE *destroy_stdout;
>>         char mdname[80];
>> -       char destroy_cmd[80];
>> +       char destroy_cmd[95];
>>         char *error;
>
>
> I know it's just a test, but 95 seems equally as magical as 80...

Agreed. I stole this number from the warning without too much thought.
Tested that it still passed, and didn't do anything  funky.



-- 
Eitan Adler
Source, Ports, Doc committer
Bugmeister, Ports Security teams



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAF6rxgmZJRewfYOVHr5a==hkn_-Uw5eEq5=Z13k=kv2e95UffA>