lkml.org 
[lkml]   [2015]   [Sep]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 10/16] Staging: lustre: obdclass: genops.c: Remove explicit NULL comparison
From
Date
On Fri, 2015-09-11 at 07:34 +0530, Shraddha Barke wrote:
> Remove explicit NULL comparison and write it in its simpler form.
> Replacement done with coccinelle:

Hi Shraddha.

If you are going to do these conversions, please
also do the equivalent != NULL conversions:

- e != NULL
+ e

> diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c
[]
> @@ -178,9 +178,9 @@ int class_register_type(struct obd_ops *dt_ops, struct md_ops *md_ops,
> - if (type->typ_dt_ops == NULL ||
> - type->typ_md_ops == NULL ||
> - type->typ_name == NULL)
> + if (!type->typ_dt_ops ||
> + !type->typ_md_ops ||
> + !type->typ_name)




\
 
 \ /
  Last update: 2015-09-11 05:21    [W:0.045 / U:0.064 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site