mirror of
https://github.com/oasislinux/oasis.git
synced 2026-10-08 12:58:46 +02:00
96 lines
3.2 KiB
Diff
96 lines
3.2 KiB
Diff
From e7bd9ecb3e914918a91c1f2f25533b943cd787bd Mon Sep 17 00:00:00 2001
|
|
From: Michael Forney <mforney@mforney.org>
|
|
Date: Tue, 18 Jun 2019 01:38:53 -0700
|
|
Subject: [PATCH] Don't omit second operand to `?` operator
|
|
|
|
---
|
|
libfdisk/src/bsd.c | 2 +-
|
|
libfdisk/src/dos.c | 2 +-
|
|
libfdisk/src/gpt.c | 2 +-
|
|
libfdisk/src/parttype.c | 2 +-
|
|
libfdisk/src/sgi.c | 2 +-
|
|
libfdisk/src/sun.c | 2 +-
|
|
6 files changed, 6 insertions(+), 6 deletions(-)
|
|
|
|
diff --git a/libfdisk/src/bsd.c b/libfdisk/src/bsd.c
|
|
index cb45e3f1a..ba73b596a 100644
|
|
--- a/libfdisk/src/bsd.c
|
|
+++ b/libfdisk/src/bsd.c
|
|
@@ -116,7 +116,7 @@ static struct fdisk_parttype *bsd_partition_parttype(
|
|
{
|
|
struct fdisk_parttype *t
|
|
= fdisk_label_get_parttype_from_code(cxt->label, p->p_fstype);
|
|
- return t ? : fdisk_new_unknown_parttype(p->p_fstype, NULL);
|
|
+ return t ? t : fdisk_new_unknown_parttype(p->p_fstype, NULL);
|
|
}
|
|
|
|
|
|
diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c
|
|
index c88d2a4f2..9bcf1ba55 100644
|
|
--- a/libfdisk/src/dos.c
|
|
+++ b/libfdisk/src/dos.c
|
|
@@ -141,7 +141,7 @@ static struct fdisk_parttype *dos_partition_parttype(
|
|
{
|
|
struct fdisk_parttype *t
|
|
= fdisk_label_get_parttype_from_code(cxt->label, p->sys_ind);
|
|
- return t ? : fdisk_new_unknown_parttype(p->sys_ind, NULL);
|
|
+ return t ? t : fdisk_new_unknown_parttype(p->sys_ind, NULL);
|
|
}
|
|
|
|
/*
|
|
diff --git a/libfdisk/src/gpt.c b/libfdisk/src/gpt.c
|
|
index b11c325f8..85040fb6b 100644
|
|
--- a/libfdisk/src/gpt.c
|
|
+++ b/libfdisk/src/gpt.c
|
|
@@ -264,7 +264,7 @@ static struct fdisk_parttype *gpt_partition_parttype(
|
|
|
|
guid_to_string(&guid, str);
|
|
t = fdisk_label_get_parttype_from_string(cxt->label, str);
|
|
- return t ? : fdisk_new_unknown_parttype(0, str);
|
|
+ return t ? t : fdisk_new_unknown_parttype(0, str);
|
|
}
|
|
|
|
static void gpt_entry_set_type(struct gpt_entry *e, struct gpt_guid *uuid)
|
|
diff --git a/libfdisk/src/parttype.c b/libfdisk/src/parttype.c
|
|
index 8e36ada74..cb555d4c9 100644
|
|
--- a/libfdisk/src/parttype.c
|
|
+++ b/libfdisk/src/parttype.c
|
|
@@ -496,7 +496,7 @@ struct fdisk_parttype *fdisk_label_advparse_parttype(
|
|
|
|
if (res)
|
|
DBG(PARTTYPE, ul_debugobj(res, "returns parsed '%s' [%s] partition type",
|
|
- res->name, res->typestr ? : ""));
|
|
+ res->name, res->typestr ? res->typestr : ""));
|
|
return res;
|
|
}
|
|
|
|
diff --git a/libfdisk/src/sgi.c b/libfdisk/src/sgi.c
|
|
index 71abedd3f..eefa4f1dc 100644
|
|
--- a/libfdisk/src/sgi.c
|
|
+++ b/libfdisk/src/sgi.c
|
|
@@ -353,7 +353,7 @@ static struct fdisk_parttype *sgi_get_parttype(struct fdisk_context *cxt, size_t
|
|
return NULL;
|
|
|
|
t = fdisk_label_get_parttype_from_code(cxt->label, sgi_get_sysid(cxt, n));
|
|
- return t ? : fdisk_new_unknown_parttype(sgi_get_sysid(cxt, n), NULL);
|
|
+ return t ? t : fdisk_new_unknown_parttype(sgi_get_sysid(cxt, n), NULL);
|
|
}
|
|
|
|
/* fdisk_get_partition() backend */
|
|
diff --git a/libfdisk/src/sun.c b/libfdisk/src/sun.c
|
|
index cd965ab13..c0f757c3e 100644
|
|
--- a/libfdisk/src/sun.c
|
|
+++ b/libfdisk/src/sun.c
|
|
@@ -831,7 +831,7 @@ static struct fdisk_parttype *sun_get_parttype(
|
|
|
|
t = fdisk_label_get_parttype_from_code(cxt->label,
|
|
be16_to_cpu(sunlabel->vtoc.infos[n].id));
|
|
- return t ? : fdisk_new_unknown_parttype(be16_to_cpu(sunlabel->vtoc.infos[n].id), NULL);
|
|
+ return t ? t : fdisk_new_unknown_parttype(be16_to_cpu(sunlabel->vtoc.infos[n].id), NULL);
|
|
}
|
|
|
|
|
|
--
|
|
2.49.0
|
|
|