MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Davi Arnaut Date:September 30 2010 11:36am
Subject:Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)
Bug#56709
View as plain text  
On 9/30/10 8:33 AM, Tor Didriksen wrote:
> On Fri, Sep 24, 2010 at 11:20 AM, Alexey Kopytov
> <Alexey.Kopytov@stripped>wrote:
>
>> >  Hi Tor,
>> >
>> >
>> >  On 23.09.10 17:58, Tor Didriksen wrote:
>> >
>>> >>  @@ -1447,8 +1442,8 @@ static void PushState(CODE_STATE *cs)
>>>> >>>     struct settings *new_malloc;
>>>> >>>
>>>> >>>     new_malloc= (struct settings *) DbugMalloc(sizeof(struct
> settings));
>>>> >>>  +  bzero(new_malloc, sizeof(struct settings));
>>>> >>>
>>>> >>>
>>> >>  man bzero:
>>> >>  This function is deprecated (marked as LEGACY in POSIX.1-2001):
> use
>>> >>  memset(3) in new programs.
>>> >>
>>> >>
>> >  Sure, but on the other hand:
>> > 
> http://forge.mysql.com/wiki/MySQL_Internals_Coding_Guidelines#Additional_suggestions
>> >
>> >  "
>> >  #  Use libstring functions (in the strings directory) instead of standard
>> >  libc string functions whenever possible. For example, use bfill() and
>> >  bzero() instead of memset().
>> >  "
>> >
>> >  I personally think of bzero() as a convenient alias for the most commonly
>> >  used form of memset(). In other words, even if bzero() did not exist, it
>> >  should have been created. And we actually do something like that in
>> >  m_string.h:
>> >
>> >  #if !defined(bzero)&&  !defined(HAVE_BZERO)
>> >  # define bzero(A,B)             memset((A),0,(B))
>> >  #endif
>
> Time for another update of the style guide I guess,
> we shouldn't be recommending functions which are deprecated.
>
>

Definitely. bzero is a officially deprecated function and we never 
actually use it because it depends on some BSD defines that we never set.

Regards,

Davi
Thread
bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov22 Sep
  • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514) Bug#56709Tor Didriksen23 Sep
    • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov24 Sep
      • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514) Bug#56709Tor Didriksen30 Sep
        • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut30 Sep
          • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Sergei Golubchik30 Sep
            • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut30 Sep
              • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut30 Sep
            • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514) Bug#56709Tor Didriksen1 Oct
              • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov1 Oct
                • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut1 Oct
                  • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov2 Oct
                • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514) Bug#56709Tor Didriksen1 Oct
                  • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov1 Oct
Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut1 Oct
  • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov1 Oct
Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov1 Oct
  • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut1 Oct
    • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov1 Oct
      • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut1 Oct
        • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Alexey Kopytov1 Oct
          • Re: bzr commit into mysql-5.1-bugteam branch (Alexey.Kopytov:3514)Bug#56709Davi Arnaut1 Oct