[PATCH v2 -next] staging: fbtft: use strcmp() instead of strncmp() for

2018-12-19 Thread YueHaibing
strncmp() stops comparing when either the end of one of the first two arguments is reached or when 'n' characters have been compared, whichever comes first.That means that strncmp(s1, s2, n) is equivalent to strcmp(s1, s2) if n exceeds the length of s1 or the length of s2. This patch avoids

Re: [PATCH v2 -next] staging: fbtft: use strcmp() instead of strncmp() for

2018-12-19 Thread YueHaibing
On 2018/12/18 21:37, Dan Carpenter wrote: > On Tue, Dec 18, 2018 at 09:25:08PM +0800, YueHaibing wrote: >> strncmp() stops comparing when either the end of one of the first two >> arguments is reached or when 'n' characters have been compared, whichever >> comes first.That means that strncmp(s1,

Re: [PATCH v2 -next] staging: fbtft: use strcmp() instead of strncmp() for

2018-12-18 Thread Dan Carpenter
On Tue, Dec 18, 2018 at 09:25:08PM +0800, YueHaibing wrote: > strncmp() stops comparing when either the end of one of the first two > arguments is reached or when 'n' characters have been compared, whichever > comes first.That means that strncmp(s1, s2, n) is equivalent to > strcmp(s1, s2) if n