[19/20] Fix resource/bug-ulimit1 test

Message ID d06cbd9f2dbdbaeeb59ddd5e3da1f0661f290ba3.1666877952.git.szabolcs.nagy@arm.com
State Committed
Commit b4174c28d21e1672ef3cc15a058558e97b8471c6
Headers
Series patches from the morello port |

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Szabolcs Nagy Oct. 27, 2022, 3:33 p.m. UTC
  ulimit is a variadic function and the second argument must have type
long (or unsigned long).
---
 resource/bug-ulimit1.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Adhemerval Zanella Oct. 27, 2022, 4:48 p.m. UTC | #1
On 27/10/22 12:33, Szabolcs Nagy via Libc-alpha wrote:
> ulimit is a variadic function and the second argument must have type
> long (or unsigned long).


LGTM, thanks.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

> ---
>  resource/bug-ulimit1.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/resource/bug-ulimit1.c b/resource/bug-ulimit1.c
> index 334d7fff04..8dd3ddf493 100644
> --- a/resource/bug-ulimit1.c
> +++ b/resource/bug-ulimit1.c
> @@ -7,7 +7,7 @@ main (void)
>    int retval = 0;
>    long int res;
>  
> -  res = ulimit (UL_SETFSIZE, 10000);
> +  res = ulimit (UL_SETFSIZE, 10000L);
>    printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res);
>    if (res != 10000)
>      retval = 1;
  

Patch

diff --git a/resource/bug-ulimit1.c b/resource/bug-ulimit1.c
index 334d7fff04..8dd3ddf493 100644
--- a/resource/bug-ulimit1.c
+++ b/resource/bug-ulimit1.c
@@ -7,7 +7,7 @@  main (void)
   int retval = 0;
   long int res;
 
-  res = ulimit (UL_SETFSIZE, 10000);
+  res = ulimit (UL_SETFSIZE, 10000L);
   printf ("Result of ulimit (UL_SETFSIZE, 10000): %ld\n", res);
   if (res != 10000)
     retval = 1;