diff options
author | Lucas De Marchi <lucas.demarchi@profusion.mobi> | 2010-11-27 17:39:03 -0200 |
---|---|---|
committer | Denis Kenzior <denkenz@gmail.com> | 2010-11-29 13:09:50 -0600 |
commit | 7484d799c9eb28bc895046c145b979ae834edc32 (patch) | |
tree | 259f10aabd2647a84aa56ac5c5cfd82c3934902e /src/simfs.c | |
parent | d77999cc5954b2a38321a0fe7b692b60582c1c36 (diff) | |
download | ofono-7484d799c9eb28bc895046c145b979ae834edc32.tar.bz2 |
simfs: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)
// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@
- !E
+ E == NULL
// </smpl>
Diffstat (limited to 'src/simfs.c')
-rw-r--r-- | src/simfs.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/simfs.c b/src/simfs.c index 5f459ab1..8e52f7b2 100644 --- a/src/simfs.c +++ b/src/simfs.c @@ -408,7 +408,7 @@ static gboolean sim_fs_op_read_record(gpointer user) switch (op->structure) { case OFONO_SIM_FILE_STRUCTURE_FIXED: - if (!driver->read_file_linear) { + if (driver->read_file_linear == NULL) { sim_fs_op_error(fs); return FALSE; } @@ -418,7 +418,7 @@ static gboolean sim_fs_op_read_record(gpointer user) sim_fs_op_retrieve_cb, fs); break; case OFONO_SIM_FILE_STRUCTURE_CYCLIC: - if (!driver->read_file_cyclic) { + if (driver->read_file_cyclic == NULL) { sim_fs_op_error(fs); return FALSE; } @@ -626,7 +626,7 @@ static gboolean sim_fs_op_next(gpointer user_data) fs->op_source = 0; - if (!fs->op_q) + if (fs->op_q == NULL) return FALSE; op = g_queue_peek_head(fs->op_q); @@ -671,16 +671,16 @@ int sim_fs_read_info(struct sim_fs *fs, int id, { struct sim_fs_op *op; - if (!cb) + if (cb == NULL) return -EINVAL; - if (!fs->driver) + if (fs->driver == NULL) return -EINVAL; - if (!fs->driver->read_file_info) + if (fs->driver->read_file_info == NULL) return -ENOSYS; - if (!fs->op_q) + if (fs->op_q == NULL) fs->op_q = g_queue_new(); op = g_try_new0(struct sim_fs_op, 1); @@ -709,16 +709,16 @@ int sim_fs_read(struct sim_fs *fs, int id, { struct sim_fs_op *op; - if (!cb) + if (cb == NULL) return -EINVAL; - if (!fs->driver) + if (fs->driver == NULL) return -EINVAL; - if (!fs->driver->read_file_info) + if (fs->driver->read_file_info == NULL) return -ENOSYS; - if (!fs->op_q) + if (fs->op_q == NULL) fs->op_q = g_queue_new(); op = g_try_new0(struct sim_fs_op, 1); @@ -749,10 +749,10 @@ int sim_fs_write(struct sim_fs *fs, int id, ofono_sim_file_write_cb_t cb, struct sim_fs_op *op; gconstpointer fn = NULL; - if (!cb) + if (cb == NULL) return -EINVAL; - if (!fs->driver) + if (fs->driver == NULL) return -EINVAL; switch (structure) { @@ -772,7 +772,7 @@ int sim_fs_write(struct sim_fs *fs, int id, ofono_sim_file_write_cb_t cb, if (fn == NULL) return -ENOSYS; - if (!fs->op_q) + if (fs->op_q == NULL) fs->op_q = g_queue_new(); op = g_try_new0(struct sim_fs_op, 1); |