Code style with commit ffa31264a657618a0e40c51c01e4bfc32e244d13

Shawn Webb <[email protected]>
Newsgroups gmane.comp.security.virus.clamav.devel
Message-ID <20170720183644.qsx4uj2xpocam3mt@mutt-gmail>
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
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEKrq2ve9q9Ia+iT2eaoRlj1JFbu4FAllw+DcACgkQaoRlj1JF
bu79zg//U+1VwFooPd7hLoh/5VbFs5ZSjdIa8XhausKutAidyOxl6cfEJfZ4VH0t
DIIfr8l8TIrljsCaqVhHNdxBvfP29bGR4ZsYh2d1ySSG58g+limd/UhbGkLABHlr
zT34iHm2ARu4/DqNYceCQLHIB0yEu0MSCARo09CdfwYuGK8s2+r3GBl7mDB3ffwL
5gxroEyjuhCnuube4Icumz6GtObdXqYidHiXGNa2qE9WcuIiFP2agn2oKSCiWVe/
NodfNhnVybCxAPDolTo8ltBti+3xkTHcRk4T+v8HxBCwGLCMkJ23cDD+Epl6flMb
ihViv6MANXGqMYqAU7tf29NPgW1Ma5A07xon/KLgiHwz2cnvas+BLfbJ5kZhasgx
6sTkvPqQ9ePPIEvKUqpbAExltsHWLhvHD/ECgLZfwoFFZVRVAUuct16XQziVHrbg
h0gwoKmD8xDHxwyUoPO0odZJPS/QHcW2dK1ZqV5L64Q6r+tesuK/WJI4VVy6JO2c
Ys+KAXoZnDXPJFYtX63zEuvyIIHSi0EJBV73+QmDV7m14y8esILPL24yFcKvMwDQ
PpE1n8YJDtYuwCVwqcMNgaSO4iiNAW3wAIboLwYnUM2VSDj7x/FjgPfhRf8goQ/W
/Uteu4LjGbmxFbKWaoXCwqLsmj+XQ+zqgXhqI42uUeM+6oow5so=
=Hdcr
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.