Re: Code style with commit ffa31264a657618a0e40c51c01e4bfc32e244d13
Shawn Webb <[email protected]>
| Newsgroups | gmane.comp.security.virus.clamav.devel |
|---|---|
| Message-ID | <20170801002051.wdikcwddtqcptfok@mutt-gmail> |
Yup. I saw the follow-up commit. Thanks! -- Shawn Webb Cofounder and Security Engineer of HardenedBSD GPG Key ID: 0x6A84658F52456EEE GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE On Mon, Jul 31, 2017 at 09:45:52PM +0000, Joel Esler (jesler) wrote: > Shawn, > > Thanks for writing in, looks like we???ve already re-formatted this code for 99.3, which should be released soon. > > > > -- > Joel Esler | Talos: Manager | [email protected] <mailto:[email protected]> > > > > > > > > On Jul 20, 2017, at 2:36 PM, Shawn Webb <[email protected]> wrote: > > > > Hey ClamAV Developers, > > > > The part of the diff that reads: > > > > if ( !(len = sys->read(fh, &buf[0], 256) > 0)) { > > > > is a little awkward. I'm wondering if it would be better to be split > > out. Something like this: > > > > len = sys->read(fh, buf, sizeof(buf)); > > if (len <= 0) { > > ... > > } > > > > That would make the code a bit more readable for future developers. It > > would also prevent issues in case the size of buf were to ever change in > > the future. > > > > Thanks, > > > > -- > > Shawn Webb > > Cofounder and Security Engineer of HardenedBSD > > > > GPG Key ID: 0x6A84658F52456EEE > > GPG Key Fingerprint: 2ABA B6BD EF6A F486 BE89 3D9E 6A84 658F 5245 6EEE > > > > _______________________________________________ > > http://lurker.clamav.net/list/clamav-devel.html > > Please submit your patches to our Bugzilla: http://bugs.clamav.net > > > > http://www.clamav.net/contact.html#ml > > _______________________________________________ > http://lurker.clamav.net/list/clamav-devel.html > Please submit your patches to our Bugzilla: http://bugs.clamav.net > > http://www.clamav.net/contact.html#ml _______________________________________________ http://lurker.clamav.net/list/clamav-devel.html Please submit your patches to our Bugzilla: http://bugs.clamav.net http://www.clamav.net/contact.html#ml
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAll/yWAACgkQaoRlj1JF bu6Ahw//TUpTLCu2zJPlcHWaA5CDr9UfHL90W5SN/v5JSswniPrkMJrsL0LhVQox 31UHmNqUL/LBUs0vDfEu4JdiMIf8pKgiVqLBME1xLwOZ41BXY4KIMOdk/HcM/KTw le0Uxd19DW8+vnsJLeRF8KsXL4IFDsp+wcc5nCJkmKbv/V++PUA+/fGEJFEV+X5E def1dtlNQ3ct3lxMnedA8XnLyFs7Zx2z4G5/6hZI80OXD8MTcOeaz6lSydmLJkh5 /dZKuA5nlK7+ciwndCK7tmpQDAvZqwLO0SASvuAY7ay+YifF/RTJrpJP6/qZHcHg oojSgQ8CUJ/JrfhRndZTEFYA08hXfouxHxz87255U9DnPeHug963nJ6SUVOx7BNE L+b2XiRVhKhIwfXrWpjLwVdxM8sqLfBWZ0Zt0FjZs3MUbg3NkcMom1JEMzlUVfC2 U3AlclHbvl7sI2gtAAid/U3PyFBmJoxtPGPZLktdfsAmEo311htkGNUMSde9Yg9f pNH7ezfAlYu18CWCpE0JXH7RH6eBlJSQP4lydB49yXx6v6e5N5cVH4qy83WgpwzQ t8rAOH0UmiAuTATVg8ZnwFlIoEgf5bYudC8sUCvJ49OdM7464BKXzojOWLjgrXgO 1zBBU5JOyJBSpOKveJ6z2nbVRrhtPvsRS4vGb6yKgvTLEV+2R20= =Z/jn -----END PGP SIGNATURE-----