Re: [PATCH] set_sock_tos: clean up error message

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

 



ping ...
-mike

On 29 Sep 2022 15:03, Mike Frysinger wrote:
> From: Mike Frysinger <vapier@xxxxxxxxxxxx>
> 
> These include a trailing colon as if error() is going to display
> another string after the message, but it doesn't.  No other call
> to error() does this either.  So drop that.
> 
> One of the error messages also uses a %.100s format spec when
> showing the strerror() output, but this doesn't actually do
> anything.  So drop that.
> ---
>  misc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/misc.c b/misc.c
> index f2135803737a..e51bd434de3a 100644
> --- a/misc.c
> +++ b/misc.c
> @@ -278,7 +278,7 @@ set_sock_tos(int fd, int tos)
>  		debug3_f("set socket %d IP_TOS 0x%02x", fd, tos);
>  		if (setsockopt(fd, IPPROTO_IP, IP_TOS,
>  		    &tos, sizeof(tos)) == -1) {
> -			error("setsockopt socket %d IP_TOS %d: %s:",
> +			error("setsockopt socket %d IP_TOS %d: %s",
>  			    fd, tos, strerror(errno));
>  		}
>  # endif /* IP_TOS */
> @@ -288,7 +288,7 @@ set_sock_tos(int fd, int tos)
>  		debug3_f("set socket %d IPV6_TCLASS 0x%02x", fd, tos);
>  		if (setsockopt(fd, IPPROTO_IPV6, IPV6_TCLASS,
>  		    &tos, sizeof(tos)) == -1) {
> -			error("setsockopt socket %d IPV6_TCLASS %d: %.100s:",
> +			error("setsockopt socket %d IPV6_TCLASS %d: %s",
>  			    fd, tos, strerror(errno));
>  		}
>  # endif /* IPV6_TCLASS */
> -- 
> 2.37.3
> 

Attachment: signature.asc
Description: PGP signature

_______________________________________________
openssh-unix-dev mailing list
openssh-unix-dev@xxxxxxxxxxx
https://lists.mindrot.org/mailman/listinfo/openssh-unix-dev

[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux