[haiku-commits] haiku: hrev51726 - src/system/libroot/posix/glibc/stdio-common

  • From: jerome.duval@xxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Wed, 3 Jan 2018 19:49:58 +0100 (CET)

hrev51726 adds 1 changeset to branch 'master'
old head: 36ef138ce5bea8bd0f634f23df827f5fdd326830
new head: 7766c048b33ed0859aaecdd26e2b670424c22c2f
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=7766c048b33e+%5E36ef138ce5be

----------------------------------------------------------------------------

7766c048b33e: libroot: Fix possible typo in printf_size.c
  
  It appears as if there is a typo in printf_size.c; it makes
  no sense to compare an unitialized variable in such a way.
  Since `info->width` is referenced later on in the variable
  assignment, it seems possible that the intended statement
  was to place the larger of the values between `info->width`
  and `info->prec` into `width`.
  
  Fixes CID 609431.
  
  korli: Patch applied in cddfcf2f875f28695f367e90027167a989503273
  was incomplete. This patch completes with what upstream did in 2004:
  
https://github.com/bminor/glibc/commit/fa5753eede3e97e94f50928989b313fb1fbdae6f.patch
  
  Signed-off-by: Jérôme Duval <jerome.duval@xxxxxxxxx>

                                                     [ ohnx <me@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev51726
Commit:      7766c048b33ed0859aaecdd26e2b670424c22c2f
URL:         http://cgit.haiku-os.org/haiku/commit/?id=7766c048b33e
Author:      ohnx <me@xxxxxxxxx>
Date:        Wed Jan  3 17:10:10 2018 UTC
Committer:   Jérôme Duval <jerome.duval@xxxxxxxxx>
Commit-Date: Wed Jan  3 18:42:55 2018 UTC

----------------------------------------------------------------------------

1 file changed, 1 insertion(+), 1 deletion(-)
src/system/libroot/posix/glibc/stdio-common/printf_size.c | 2 +-

----------------------------------------------------------------------------

diff --git a/src/system/libroot/posix/glibc/stdio-common/printf_size.c 
b/src/system/libroot/posix/glibc/stdio-common/printf_size.c
index db0f6d8..9837356 100644
--- a/src/system/libroot/posix/glibc/stdio-common/printf_size.c
+++ b/src/system/libroot/posix/glibc/stdio-common/printf_size.c
@@ -183,7 +183,7 @@ printf_size (FILE *fp, const struct printf_info *info, 
const void *const *args)
 
   if (special)
     {
-      int width = info->prec > width ? info->prec : info->width;
+      int width = info->prec > info->width ? info->prec : info->width;
 
       if (negative || info->showsign || info->space)
        --width;


Other related posts:

  • » [haiku-commits] haiku: hrev51726 - src/system/libroot/posix/glibc/stdio-common - jerome . duval