List:Commits« Previous MessageNext Message »
From:Konstantin Osipov Date:September 11 2008 10:35pm
Subject:Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763
View as plain text  
* Davi Arnaut <Davi.Arnaut@stripped> [08/09/12 02:26]:
> Konstantin Osipov wrote:
> > * Davi Arnaut <Davi.Arnaut@stripped> [08/09/12 00:30]:
> >>> +          bzero((char*) &table_list,sizeof(table_list));
> >> Use memset.
> > 
> > No offense, but this bikeshed  is a bit annoyed.
> > 
> > MySQL has its own implementation of bzero in mysys, so it's
> > kosher.
> > 
> 
> Dear Mr. Osipov,
> 
> I normally nag at it because it reveals copy-and-paste attitude and it
> requires a noisy cast because the function is so old and broken that
> some implementations take the first argument as a char pointer and
> others as a void pointer, nonetheless, it's also a deprecated function.
> 
> OTOH, memset is pretty straightforward and many compilers will optimize
> it away without any trouble. So, I'll keep being a douche every time I
> see deprecated functions being used for no good reason.

Part of the coding style, added by Monty ages ago:

* Use libstring functions (in the strings directory) instead of
standard libc string functions whenever possible. For example, use
bfill() and bzero() instead of memset().


:-p

Now, all this time it just worked.

Bikeshed it is.

-- 
Thread
bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Sergey Glukhov5 Sep
  • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Davi Arnaut11 Sep
    • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Konstantin Osipov11 Sep
      • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Davi Arnaut12 Sep
        • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Konstantin Osipov12 Sep
          • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Konstantin Osipov12 Sep
            • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Davi Arnaut12 Sep
              • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Konstantin Osipov12 Sep
                • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Davi Arnaut12 Sep
          • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Davi Arnaut12 Sep
            • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Konstantin Osipov12 Sep
              • Re: bzr commit into mysql-5.0 branch (gluh:2678) Bug#22763Davi Arnaut12 Sep