lkml.org 
[lkml]   [2019]   [Jul]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] NFS: Less function calls in show_pnfs()
From
Date
>> +++ b/fs/nfs/super.c
>> @@ -749,11 +749,10 @@ static void show_sessions(struct seq_file *m, struct nfs_server *server) {}
>> #ifdef CONFIG_NFS_V4_1
>> static void show_pnfs(struct seq_file *m, struct nfs_server *server)
>> {
>> - seq_printf(m, ",pnfs=");
>> - if (server->pnfs_curr_ld)
>> - seq_printf(m, "%s", server->pnfs_curr_ld->name);
>> - else
>> - seq_printf(m, "not configured");
>> + seq_printf(m, ",pnfs=%s",
>> + server->pnfs_curr_ld
>> + ? server->pnfs_curr_ld->name
>> + : "not configured");
>
> Unreadable.

* Do you find any other source code formatting more readable
for the usage of the ternary operator?

* How do you think about the general software transformation possibility
(at this place)?

Regards,
Markus

\
 
 \ /
  Last update: 2019-07-03 10:48    [W:0.038 / U:0.520 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site