//------------------------------------------------------------------------------\r
//\r
// Copyright (c) 2017, Pete Batard. All rights reserved.<BR>\r
+// Copyright (c) 2021, Arm Limited. All rights reserved.<BR>\r
//\r
// SPDX-License-Identifier: BSD-2-Clause-Patent\r
//\r
{\r
unsigned char *d = s;\r
\r
- while (n--)\r
+ while (n-- != 0) {\r
*d++ = (unsigned char)c;\r
+ }\r
\r
return s;\r
}\r