[PATCH] *put*s: indentation

Kacper Piwiński cosiekvfj@o2.pl
Sat Sep 25 19:46:18 GMT 2021


Make indentation consistent across *put*s functions
---
 libio/iofputs.c    | 2 ++
 libio/iofputs_u.c  | 5 ++++-
 libio/iofputws.c   | 2 ++
 libio/iofputws_u.c | 2 ++
 libio/ioputs.c     | 3 +--
 5 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/libio/iofputs.c b/libio/iofputs.c
index a8721314bc..c865b01f61 100644
--- a/libio/iofputs.c
+++ b/libio/iofputs.c
@@ -34,9 +34,11 @@ _IO_fputs (const char *str, FILE *fp)
   int result = EOF;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
+
   if ((_IO_vtable_offset (fp) != 0 || _IO_fwide (fp, -1) == -1)
       && _IO_sputn (fp, str, len) == len)
     result = 1;
+
   _IO_release_lock (fp);
   return result;
 }
diff --git a/libio/iofputs_u.c b/libio/iofputs_u.c
index b9eb3b415f..9c3d81f7bc 100644
--- a/libio/iofputs_u.c
+++ b/libio/iofputs_u.c
@@ -34,8 +34,11 @@ __fputs_unlocked (const char *str, FILE *fp)
   size_t len = strlen (str);
   int result = EOF;
   CHECK_FILE (fp, EOF);
-  if (_IO_fwide (fp, -1) == -1 && _IO_sputn (fp, str, len) == len)
+
+  if (_IO_fwide (fp, -1) == -1
+      && _IO_sputn (fp, str, len) == len)
     result = 1;
+
   return result;
 }
 libc_hidden_def (__fputs_unlocked)
diff --git a/libio/iofputws.c b/libio/iofputws.c
index 614ac0e336..6f50f42fab 100644
--- a/libio/iofputws.c
+++ b/libio/iofputws.c
@@ -34,9 +34,11 @@ fputws (const wchar_t *str, FILE *fp)
   int result = EOF;
   CHECK_FILE (fp, EOF);
   _IO_acquire_lock (fp);
+
   if (_IO_fwide (fp, 1) == 1
       && _IO_sputn (fp, (char *) str, len) == len)
     result = 1;
+
   _IO_release_lock (fp);
   return result;
 }
diff --git a/libio/iofputws_u.c b/libio/iofputws_u.c
index 0b0cacd293..94aa4bf199 100644
--- a/libio/iofputws_u.c
+++ b/libio/iofputws_u.c
@@ -34,9 +34,11 @@ fputws_unlocked (const wchar_t *str, FILE *fp)
   size_t len = __wcslen (str);
   int result = EOF;
   CHECK_FILE (fp, EOF);
+
   if (_IO_fwide (fp, 1) == 1
       && _IO_sputn (fp, (char *) str, len) == len)
     result = 1;
+
   return result;
 }
 libc_hidden_def (fputws_unlocked)
diff --git a/libio/ioputs.c b/libio/ioputs.c
index 99a177876a..5969c0af30 100644
--- a/libio/ioputs.c
+++ b/libio/ioputs.c
@@ -35,8 +35,7 @@ _IO_puts (const char *str)
   size_t len = strlen (str);
   _IO_acquire_lock (stdout);
 
-  if ((_IO_vtable_offset (stdout) != 0
-       || _IO_fwide (stdout, -1) == -1)
+  if ((_IO_vtable_offset (stdout) != 0 || _IO_fwide (stdout, -1) == -1)
       && _IO_sputn (stdout, str, len) == len
       && _IO_putc_unlocked ('\n', stdout) != EOF)
     result = MIN (INT_MAX, len + 1);
-- 
2.33.0



More information about the Libc-alpha mailing list