clang-format

This commit is contained in:
2024-09-10 13:03:02 -04:00
parent 53c617d779
commit d66450e427
381 changed files with 28864 additions and 34170 deletions

View File

@@ -43,26 +43,24 @@
* C standard string function: find leftmost instance of a character
* in a string.
*/
char *
strchr(const char *s, int ch_arg)
{
/* avoid sign-extension problems */
const char ch = ch_arg;
char *strchr(const char *s, int ch_arg) {
/* avoid sign-extension problems */
const char ch = ch_arg;
/* scan from left to right */
while (*s) {
/* if we hit it, return it */
if (*s == ch) {
return (char *)s;
}
s++;
}
/* scan from left to right */
while (*s) {
/* if we hit it, return it */
if (*s == ch) {
return (char *)s;
}
s++;
}
/* if we were looking for the 0, return that */
if (*s == ch) {
return (char *)s;
}
/* if we were looking for the 0, return that */
if (*s == ch) {
return (char *)s;
}
/* didn't find it */
return NULL;
/* didn't find it */
return NULL;
}