You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Matsuzaki Yoshinobu <ma...@iij.ad.jp> on 2002/05/07 20:48:49 UTC

[PATCH] lack of giga[G] in apr_strfsize()

In apr_strings.c, unit character as giga[G] is lost in apr_strfsize().
So, apr_strfsize() returns wrong value if over Giga-unit data applied.

--- apr_strings-old.c   Thu Mar 14 08:27:24 2002
+++ apr_strings.c       Wed May  8 02:33:06 2002
@@ -265,7 +265,7 @@

 APR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf)
 {
-    const char ord[] = "KMTPE";
+    const char ord[] = "KMGTPE";
     const char *o = ord;
     int remain;

thanks.
-----
Matsuzaki Yoshinobu <ma...@iij.ad.jp> 
 - Internet Initiative Japan Inc.

Re: [PATCH] lack of giga[G] in apr_strfsize()

Posted by Brian Pane <br...@cnet.com>.
Thanks!  I just committed the fix.
--Brian

Matsuzaki Yoshinobu wrote:

>In apr_strings.c, unit character as giga[G] is lost in apr_strfsize().
>So, apr_strfsize() returns wrong value if over Giga-unit data applied.
>
>--- apr_strings-old.c   Thu Mar 14 08:27:24 2002
>+++ apr_strings.c       Wed May  8 02:33:06 2002
>@@ -265,7 +265,7 @@
>
> APR_DECLARE(char *) apr_strfsize(apr_off_t size, char *buf)
> {
>-    const char ord[] = "KMTPE";
>+    const char ord[] = "KMGTPE";
>     const char *o = ord;
>     int remain;
>
>thanks.
>-----
>Matsuzaki Yoshinobu <ma...@iij.ad.jp> 
> - Internet Initiative Japan Inc.
>