From 0f8cb36d35fecef23db586462a420651f62b8a02 Mon Sep 17 00:00:00 2001 From: Wiktor Lawski Date: Mon, 3 Sep 2012 11:57:25 +0200 Subject: [PATCH] plugins: Delete unnecessary initializes Those variables are always written before read so there is no need to initialize them. --- plugins/nfctype1.c | 2 +- plugins/nfctype4.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/nfctype1.c b/plugins/nfctype1.c index c614697..52ed597 100644 --- a/plugins/nfctype1.c +++ b/plugins/nfctype1.c @@ -241,7 +241,7 @@ static int meta_recv(uint8_t *resp, int length, void *data) { struct t1_cookie *cookie = data; struct near_tag *tag; - struct type1_tag *t1_tag = NULL; + struct type1_tag *t1_tag; uint8_t *cc; int err = -EOPNOTSUPP; diff --git a/plugins/nfctype4.c b/plugins/nfctype4.c index 8eb4b26..ba3f34d 100644 --- a/plugins/nfctype4.c +++ b/plugins/nfctype4.c @@ -356,7 +356,7 @@ static int t4_readbin_NDEF_ID(uint8_t *resp, int length, void *data) { struct t4_cookie *cookie = data; struct near_tag *tag; - int err = 0; + int err; DBG("%d", length); @@ -416,7 +416,7 @@ out_err: static int t4_select_NDEF_ID(uint8_t *resp, int length, void *data) { struct t4_cookie *cookie = data; - int err = 0; + int err; DBG("%d", length); @@ -448,7 +448,7 @@ static int t4_readbin_cc(uint8_t *resp, int length, void *data) { struct t4_cookie *cookie = data; struct type4_cc *read_cc; - int err = 0; + int err; DBG("%d", length); @@ -504,7 +504,7 @@ out_err: static int t4_select_cc(uint8_t *resp, int length, void *data) { struct t4_cookie *cookie = data; - int err = 0; + int err; DBG("%d", length); @@ -551,7 +551,7 @@ out_err: static int t4_select_file_by_name_v1(uint8_t *resp, int length, void *data) { struct t4_cookie *cookie = data; - int err = 0; + int err; DBG("%d", length); @@ -587,7 +587,7 @@ out_err: static int t4_select_file_by_name_v2(uint8_t *resp, int length, void *data) { struct t4_cookie *cookie = data; - int err = 0; + int err; DBG("%d", length); @@ -634,7 +634,7 @@ static int nfctype4_read(uint32_t adapter_idx, uint32_t target_idx, near_tag_io_cb cb) { struct t4_cookie *cookie; - int err = 0; + int err; DBG(""); @@ -803,7 +803,7 @@ static int nfctype4_check_presence(uint32_t adapter_idx, uint32_t target_idx, near_tag_io_cb cb) { struct t4_cookie *cookie; - int err = 0; + int err; DBG(""); -- 2.7.4