Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files

2019-05-29 Thread Thomas Monjalon
10/05/2019 16:55, Bruce Richardson: > On Fri, May 10, 2019 at 10:53:12AM -0400, Michael Santana wrote: > > snprintf guarantees to always correctly place a null terminator in the > > buffer > > string. So manually placing a null terminator in a buffer right after a call > > to snprintf is redundant

Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files

2019-05-28 Thread Michael Santana Francisco
On 5/10/19 11:28 AM, Burakov, Anatoly wrote: On 10-May-19 3:53 PM, Michael Santana wrote: snprintf guarantees to always correctly place a null terminator in the buffer string. So manually placing a null terminator in a buffer right after a call to snprintf is redundant code. Additionally, the

Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files

2019-05-10 Thread Burakov, Anatoly
On 10-May-19 3:53 PM, Michael Santana wrote: snprintf guarantees to always correctly place a null terminator in the buffer string. So manually placing a null terminator in a buffer right after a call to snprintf is redundant code. Additionally, there is no need to use 'sizeof(buffer) - 1' in snp

Re: [dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files

2019-05-10 Thread Bruce Richardson
On Fri, May 10, 2019 at 10:53:12AM -0400, Michael Santana wrote: > snprintf guarantees to always correctly place a null terminator in the buffer > string. So manually placing a null terminator in a buffer right after a call > to snprintf is redundant code. > > Additionally, there is no need to use

[dpdk-dev] [PATCH] Fix off-by-one errors in snprintf in various files

2019-05-10 Thread Michael Santana
snprintf guarantees to always correctly place a null terminator in the buffer string. So manually placing a null terminator in a buffer right after a call to snprintf is redundant code. Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as this means we are not using the last c