"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: tog: remove gcc ternary if extension
To:
Mark Jamsek <mark@jamsek.com>
Cc:
Game of Trees <gameoftrees@openbsd.org>
Date:
Wed, 31 Aug 2022 14:01:59 +0200

Download raw body.

Thread
On Wed, Aug 31, 2022 at 09:49:51PM +1000, Mark Jamsek wrote:
> This was discussed sometime ago: don't use this extension in Got.
> There's another diff incoming doing the same in diff.git
> 

ok

> -----------------------------------------------
> commit 262a2cc0ac9fc42baccd8b2521cd966278568636 (main)
> from: Mark Jamsek <mark@jamsek.dev>
> date: Wed Aug 31 11:40:38 2022 UTC
>  
>  tog: remove gcc ternary if extension
>  
> diff 3c8433402874be5d4f42156998646f05de8535c3 262a2cc0ac9fc42baccd8b2521cd966278568636
> commit - 3c8433402874be5d4f42156998646f05de8535c3
> commit + 262a2cc0ac9fc42baccd8b2521cd966278568636
> blob - 6ec8b5f0c155fafe55ee2aab0653d259876e6254
> blob + d3fe18a13136b64b9e9ba153ae5a2deda0482b9c
> --- tog/tog.c
> +++ tog/tog.c
> @@ -4692,14 +4692,14 @@ show_diff_view(struct tog_view *view)
>  		err = got_object_id_str(&id_str1, s->id1);
>  		if (err)
>  			return err;
> -		label1 = s->label1 ? : id_str1;
> +		label1 = s->label1 ? s->label1 : id_str1;
>  	} else
>  		label1 = "/dev/null";
>  
>  	err = got_object_id_str(&id_str2, s->id2);
>  	if (err)
>  		return err;
> -	label2 = s->label2 ? : id_str2;
> +	label2 = s->label2 ? s->label2 : id_str2;
>  
>  	if (asprintf(&header, "diff %s %s", label1, label2) == -1) {
>  		err = got_error_from_errno("asprintf");
> 
> 
> -- 
> Mark Jamsek <fnc.bsdbox.org>
> GPG: F2FF 13DE 6A06 C471 CA80  E6E2 2930 DC66 86EE CF68