UPSTREAM: src/include: Remove braces for single statements
Fix the following warning detected by checkpatch.pl:
WARNING: braces {} are not necessary for single statement blocks
TEST=Build and run on Galileo Gen2
Change-Id: Ic05932eec8c057c0501915ed62478db487f20135
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bfdb8937b2
Original-Change-Id: I00b59f6a27c3acb393deaa763596363b7e958efd
Original-Signed-off-by: Lee Leahy <Leroy.P.Leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/18654
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/453681
This commit is contained in:
parent
e4befad6d1
commit
370c46c877
4 changed files with 7 additions and 14 deletions
|
|
@ -24,18 +24,16 @@ int snprintf(char * buf, size_t size, const char *fmt, ...);
|
|||
static inline size_t strnlen(const char *src, size_t max)
|
||||
{
|
||||
size_t i = 0;
|
||||
while ((*src++) && (i < max)) {
|
||||
while ((*src++) && (i < max))
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
static inline size_t strlen(const char *src)
|
||||
{
|
||||
size_t i = 0;
|
||||
while (*src++) {
|
||||
while (*src++)
|
||||
i++;
|
||||
}
|
||||
return i;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue