Message ID | 1499307939-17547-1-git-send-email-thuth@redhat.com |
---|---|
State | Accepted |
Headers | show |
On 06/07/17 12:25, Thomas Huth wrote: > If size_t is only "int", memset() and friends are limited > to 4 GB. And ssize_t is already declared as "long", so it > is somewhat inconsequent to define size_t as "int" only. > Thanks, applied. > Signed-off-by: Thomas Huth <thuth@redhat.com> > --- > lib/libc/include/stddef.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/lib/libc/include/stddef.h b/lib/libc/include/stddef.h > index ba2d960..e240106 100644 > --- a/lib/libc/include/stddef.h > +++ b/lib/libc/include/stddef.h > @@ -16,8 +16,7 @@ > > #define NULL ((void *)0) > > - > -typedef unsigned int size_t; > +typedef unsigned long size_t; > > > #endif >
diff --git a/lib/libc/include/stddef.h b/lib/libc/include/stddef.h index ba2d960..e240106 100644 --- a/lib/libc/include/stddef.h +++ b/lib/libc/include/stddef.h @@ -16,8 +16,7 @@ #define NULL ((void *)0) - -typedef unsigned int size_t; +typedef unsigned long size_t; #endif
If size_t is only "int", memset() and friends are limited to 4 GB. And ssize_t is already declared as "long", so it is somewhat inconsequent to define size_t as "int" only. Signed-off-by: Thomas Huth <thuth@redhat.com> --- lib/libc/include/stddef.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)