Re: [PATCH v4] char: hw_random: core.c: Changed from using strncat to strlcat

2014-10-16 Thread Rickard Strandqvist
2014-10-16 20:25 GMT+02:00 Jason Cooper : > On Thu, Oct 16, 2014 at 08:15:55PM +0200, Rickard Strandqvist wrote: >> The buf is used to hold the list of hwrng devices registered. >> The old code ensures we don't walk off the end of buf as we >> fill it, but it's unnecessarily complicated and thus

Re: [PATCH v4] char: hw_random: core.c: Changed from using strncat to strlcat

2014-10-16 Thread Jason Cooper
On Thu, Oct 16, 2014 at 08:15:55PM +0200, Rickard Strandqvist wrote: > The buf is used to hold the list of hwrng devices registered. > The old code ensures we don't walk off the end of buf as we > fill it, but it's unnecessarily complicated and thus difficult > to maintain. Simplify it by using

[PATCH v4] char: hw_random: core.c: Changed from using strncat to strlcat

2014-10-16 Thread Rickard Strandqvist
The buf is used to hold the list of hwrng devices registered. The old code ensures we don't walk off the end of buf as we fill it, but it's unnecessarily complicated and thus difficult to maintain. Simplify it by using strlcat. We also ensure the string within buf is NULL terminated so the final

[PATCH v4] char: hw_random: core.c: Changed from using strncat to strlcat

2014-10-16 Thread Rickard Strandqvist
The buf is used to hold the list of hwrng devices registered. The old code ensures we don't walk off the end of buf as we fill it, but it's unnecessarily complicated and thus difficult to maintain. Simplify it by using strlcat. We also ensure the string within buf is NULL terminated so the final

Re: [PATCH v4] char: hw_random: core.c: Changed from using strncat to strlcat

2014-10-16 Thread Jason Cooper
On Thu, Oct 16, 2014 at 08:15:55PM +0200, Rickard Strandqvist wrote: The buf is used to hold the list of hwrng devices registered. The old code ensures we don't walk off the end of buf as we fill it, but it's unnecessarily complicated and thus difficult to maintain. Simplify it by using

Re: [PATCH v4] char: hw_random: core.c: Changed from using strncat to strlcat

2014-10-16 Thread Rickard Strandqvist
2014-10-16 20:25 GMT+02:00 Jason Cooper ja...@lakedaemon.net: On Thu, Oct 16, 2014 at 08:15:55PM +0200, Rickard Strandqvist wrote: The buf is used to hold the list of hwrng devices registered. The old code ensures we don't walk off the end of buf as we fill it, but it's unnecessarily