浏览代码

staging: lustre: lnet: Rewrite return statement in socklnd.c

Rewrite the return statement in socklnd.c to eliminate the
use of a ternary operator. This will prevent the checkpatch.pl
script from generating a warning saying to remove () from
this particular return statement.

Signed-off-by: Lisa Nguyen <lisa@xenapiadmin.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Lisa Nguyen 12 年之前
父节点
当前提交
6a123705d8
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c

+ 4 - 1
drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c

@@ -1768,7 +1768,10 @@ ksocknal_close_matching_conns (lnet_process_id_t id, __u32 ipaddr)
 	if (id.nid == LNET_NID_ANY || id.pid == LNET_PID_ANY || ipaddr == 0)
 	if (id.nid == LNET_NID_ANY || id.pid == LNET_PID_ANY || ipaddr == 0)
 		return (0);
 		return (0);
 
 
-	return (count == 0 ? -ENOENT : 0);
+	if (count == 0)
+		return -ENOENT;
+	else
+		return 0;
 }
 }
 
 
 void
 void