This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 2/2] posix: Remove ununsed posix_spawn internal assignment


On Apr 24 2017, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:

> 	* sysdeps/unix/sysv/linux/spawni.c (__spawni_child): Remove ununsed
> 	assignment.

Ok.

> @@ -183,13 +182,13 @@ __spawni_child (void *arguments)
>  
>    /* Set the process group ID.  */
>    if ((attr->__flags & POSIX_SPAWN_SETPGROUP) != 0
> -      && (ret = __setpgid (0, attr->__pgrp)) != 0)
> +      && (__setpgid (0, attr->__pgrp) != 0))
>      goto fail;
>  
>    /* Set the effective user and group IDs.  */
>    if ((attr->__flags & POSIX_SPAWN_RESETIDS) != 0
> -      && ((ret = local_seteuid (__getuid ())) != 0
> -	  || (ret = local_setegid (__getgid ())) != 0))
> +      && ((local_seteuid (__getuid ()) != 0)
> +	  || (local_setegid (__getgid ()) != 0)))
>      goto fail;
>  
>    /* Execute the file actions.  */

The extra pair of parens around the expressions are no longer needed.

Andreas.

-- 
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]