aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/ber.c
diff options
context:
space:
mode:
authorsahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-06-17 10:26:20 +0000
committersahlberg <sahlberg@f5534014-38df-0310-8fa8-9805f1628bb7>2006-06-17 10:26:20 +0000
commit3761542e65c87529d1e468a2fe0b8cb5f27a620a (patch)
tree22ff1d6688e7f636ef79feef6a68d46b52a959d5 /wiretap/ber.c
parent9539ad67d5c9046b316a095170a74d7bd9d1d414 (diff)
fix coverity "bug" 184 (false positive)
the contract for wiretap ..._read() functions are that the *err pointer MUST always be provided as a valid pointer and not a NULL pointer. ber.c contained a spurios and redundant check for the pointer being non-NULL wich triggered coverity to detect this as a false positive. this redundant test if the pointer is NULL has been revoved. git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@18492 f5534014-38df-0310-8fa8-9805f1628bb7
Diffstat (limited to 'wiretap/ber.c')
-rw-r--r--wiretap/ber.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wiretap/ber.c b/wiretap/ber.c
index 70183cacb0..fb57eb3fbe 100644
--- a/wiretap/ber.c
+++ b/wiretap/ber.c
@@ -83,8 +83,7 @@ static gboolean ber_read(wtap *wth, int *err, gchar **err_info, long *data_offse
wth->phdr.len = packet_size;
if (fstat(wth->fd, &statb) == -1) {
- if (err != NULL)
- *err = errno;
+ *err = errno;
return FALSE;
}