UPSTREAM: src/include: Move assignment out of if condition

Fix the following error detected by checkpatch.pl:

ERROR: do not use assignment in if condition

TEST=Build and run on Galileo Gen2

Change-Id: I55b19613ce00772a34855590b6736f4281cdf856
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b1260553be
Original-Change-Id: I911d528bd85afcd9f3837241494f13d1f9f283ab
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18659
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/454549
This commit is contained in:
Lee Leahy 2017-03-07 16:01:09 -08:00 committed by chrome-bot
commit 9e38697e8c

View file

@ -69,10 +69,13 @@ static inline char *strconcat(const char *s1, const char *s2)
static inline char *strncpy(char *to, const char *from, int count)
{
register char *ret = to;
register char data;
while (count > 0) {
count--;
if ((*to++ = *from++) == '\0')
data = *from++;
*to++ = data;
if (data == '\0')
break;
}