linux-qubasis

linux oasis port as a qubes template

git clone https://9o.is/git/linux-qubasis.git

0001-Don-t-omit-second-operand-to-operator.patch

(3286B)


      1 From 8dc30022b3a899eae7e323b99b5e4fb79518e216 Mon Sep 17 00:00:00 2001
      2 From: Michael Forney <mforney@mforney.org>
      3 Date: Tue, 18 Jun 2019 01:38:53 -0700
      4 Subject: [PATCH] Don't omit second operand to `?` operator
      5 
      6 ---
      7  libfdisk/src/bsd.c      | 2 +-
      8  libfdisk/src/dos.c      | 2 +-
      9  libfdisk/src/gpt.c      | 2 +-
     10  libfdisk/src/parttype.c | 2 +-
     11  libfdisk/src/sgi.c      | 2 +-
     12  libfdisk/src/sun.c      | 2 +-
     13  6 files changed, 6 insertions(+), 6 deletions(-)
     14 
     15 diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
     16 index 313ae5ae0..0883915f6 100644
     17 --- a/libfdisk/src/bsd.c
     18 +++ b/libfdisk/src/bsd.c
     19 @@ -116,7 +116,7 @@ static struct fdisk_parttype *bsd_partition_parttype(
     20  {
     21  	struct fdisk_parttype *t
     22  		= fdisk_label_get_parttype_from_code(cxt->label, p->p_fstype);
     23 -	return t ? : fdisk_new_unknown_parttype(p->p_fstype, NULL);
     24 +	return t ? t : fdisk_new_unknown_parttype(p->p_fstype, NULL);
     25  }
     26  
     27  
     28 diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
     29 index 4368e5266..a8103ac72 100644
     30 --- a/libfdisk/src/dos.c
     31 +++ b/libfdisk/src/dos.c
     32 @@ -148,7 +148,7 @@ static struct fdisk_parttype *dos_partition_parttype(
     33  {
     34  	struct fdisk_parttype *t
     35  		= fdisk_label_get_parttype_from_code(cxt->label, p->sys_ind);
     36 -	return t ? : fdisk_new_unknown_parttype(p->sys_ind, NULL);
     37 +	return t ? t : fdisk_new_unknown_parttype(p->sys_ind, NULL);
     38  }
     39  
     40  /*
     41 diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
     42 index 97b161312..5fd9b4d73 100644
     43 --- a/libfdisk/src/gpt.c
     44 +++ b/libfdisk/src/gpt.c
     45 @@ -262,7 +262,7 @@ static struct fdisk_parttype *gpt_partition_parttype(
     46  
     47  	guid_to_string(&guid, str);
     48  	t = fdisk_label_get_parttype_from_string(cxt->label, str);
     49 -	return t ? : fdisk_new_unknown_parttype(0, str);
     50 +	return t ? t : fdisk_new_unknown_parttype(0, str);
     51  }
     52  
     53  static void gpt_entry_set_type(struct gpt_entry *e, struct gpt_guid *uuid)
     54 diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c
     55 index 3a5db9c28..b8d017a1d 100644
     56 --- a/libfdisk/src/parttype.c
     57 +++ b/libfdisk/src/parttype.c
     58 @@ -491,7 +491,7 @@ struct fdisk_parttype *fdisk_label_advparse_parttype(
     59  
     60  	if (res)
     61  		DBG(PARTTYPE, ul_debugobj(res, "returns parsed '%s' [%s] partition type",
     62 -				res->name, res->typestr ? : ""));
     63 +				res->name, res->typestr ? res->typestr : ""));
     64  	return res;
     65  }
     66  
     67 diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c
     68 index 64adf3454..02fd59650 100644
     69 --- a/libfdisk/src/sgi.c
     70 +++ b/libfdisk/src/sgi.c
     71 @@ -351,7 +351,7 @@ static struct fdisk_parttype *sgi_get_parttype(struct fdisk_context *cxt, size_t
     72  		return NULL;
     73  
     74  	t = fdisk_label_get_parttype_from_code(cxt->label, sgi_get_sysid(cxt, n));
     75 -	return t ? : fdisk_new_unknown_parttype(sgi_get_sysid(cxt, n), NULL);
     76 +	return t ? t : fdisk_new_unknown_parttype(sgi_get_sysid(cxt, n), NULL);
     77  }
     78  
     79  /* fdisk_get_partition() backend */
     80 diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
     81 index 4c3b1d8cb..7a5c63b5b 100644
     82 --- a/libfdisk/src/sun.c
     83 +++ b/libfdisk/src/sun.c
     84 @@ -827,7 +827,7 @@ static struct fdisk_parttype *sun_get_parttype(
     85  
     86  	t = fdisk_label_get_parttype_from_code(cxt->label,
     87  			be16_to_cpu(sunlabel->vtoc.infos[n].id));
     88 -	return t ? : fdisk_new_unknown_parttype(be16_to_cpu(sunlabel->vtoc.infos[n].id), NULL);
     89 +	return t ? t : fdisk_new_unknown_parttype(be16_to_cpu(sunlabel->vtoc.infos[n].id), NULL);
     90  }
     91  
     92  
     93 -- 
     94 2.31.1
     95