Re: af_alg: Comment and style improvements

2018-06-25 Thread Bruno Haible
Paul Eggert wrote: > > - /* Avoid calling both strcpy and strlen. */ > > - for (int i = 0; (salg.salg_name[i] = alg[i]); i++) > > + /* Copy alg into salg.salg_name, without calling strcpy nor strlen. */ > > + for (size_t i = 0; (salg.salg_name[i] = alg[i]) != '\0'; i++) > If you don't like i

Re: af_alg: Comment and style improvements

2018-06-25 Thread Paul Eggert
On 06/24/2018 03:28 PM, Bruno Haible wrote: - /* Avoid calling both strcpy and strlen. */ - for (int i = 0; (salg.salg_name[i] = alg[i]); i++) + /* Copy alg into salg.salg_name, without calling strcpy nor strlen. */ + for (size_t i = 0; (salg.salg_name[i] = alg[i]) != '\0'; i++) I prefer

af_alg: Comment and style improvements

2018-06-24 Thread Bruno Haible
Mostly comment fixes: - Clarify that the bug in Linux < 4.9 was discovered in Sept. 2016 but not fixed until Nov. 2016. - & others. 2018-06-24 Bruno Haible af_alg: Comment and style improvements. * lib/af_alg.c (alg_socket): Use 'size_t' as in