Ternary Operator (was: [PATCH mdadm v2] super1: report truncated device)

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

 



Dear Mariusz,


Am 21.07.22 um 10:19 schrieb Mariusz Tkaczyk:

On Wed, 13 Jul 2022 13:48:11 +1000 NeilBrown wrote:

[…]

+	}
+	printf("          State : %s%s\n",
+	       (__le64_to_cpu(sb->resync_offset)+1)? "active":"clean",
+	       info.space_after > INT64_MAX ? " TRUNCATED DEVICE" : "");

Could you use standard if instruction to make the code more readable? We are
avoiding ternary operators if possible now.

That’s news to me. Where is that documented? If find the operator quite useful in situations like this.


Kind regards,

Paul



[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux