From ee0f2b5ae8879fe0005b1829407d48c97cdbb12d Mon Sep 17 00:00:00 2001 From: green Date: Tue, 21 Oct 2003 20:56:02 +0000 Subject: [PATCH] Fixing dead code from "comparing unisgned with zero" class --- lnet/klnds/toelnd/toenal_cb.c | 1 - lnet/lnet/lib-me.c | 2 +- lnet/lnet/lib-move.c | 4 ---- lustre/portals/knals/toenal/toenal_cb.c | 1 - lustre/portals/portals/lib-me.c | 2 +- lustre/portals/portals/lib-move.c | 4 ---- 6 files changed, 2 insertions(+), 12 deletions(-) diff --git a/lnet/klnds/toelnd/toenal_cb.c b/lnet/klnds/toelnd/toenal_cb.c index f92511a..983fa71 100644 --- a/lnet/klnds/toelnd/toenal_cb.c +++ b/lnet/klnds/toelnd/toenal_cb.c @@ -371,7 +371,6 @@ ktoenal_launch_packet (ksock_conn_t *conn, ksock_tx_t *tx) for (;;) { LASSERT (niov <= tx->tx_niov); - LASSERT (iov->iov_len >= 0); if (iov->iov_len >= nob) { diff --git a/lnet/lnet/lib-me.c b/lnet/lnet/lib-me.c index bd1af5b..31ac214 100644 --- a/lnet/lnet/lib-me.c +++ b/lnet/lnet/lib-me.c @@ -44,7 +44,7 @@ int do_PtlMEAttach(nal_cb_t * nal, void *private, void *v_args, void *v_ret) unsigned long flags; lib_me_t *me; - if (args->index_in < 0 || args->index_in >= tbl->size) + if (args->index_in >= tbl->size) return ret->rc = PTL_INV_PTINDEX; /* Should check for valid matchid, but not yet */ diff --git a/lnet/lnet/lib-move.c b/lnet/lnet/lib-move.c index f710476..e73cbb8 100644 --- a/lnet/lnet/lib-move.c +++ b/lnet/lnet/lib-move.c @@ -305,8 +305,6 @@ lib_extract_iov (struct iovec *dst, lib_md_t *md, ptl_size_t frag_len; int dst_niov; - LASSERT (len >= 0); - LASSERT (offset >= 0); LASSERT (offset + len <= md->length); if (len == 0) /* no data => */ @@ -442,8 +440,6 @@ lib_extract_kiov (ptl_kiov_t *dst, lib_md_t *md, ptl_size_t frag_len; int dst_niov; - LASSERT (len >= 0); - LASSERT (offset >= 0); LASSERT (offset + len <= md->length); if (len == 0) /* no data => */ diff --git a/lustre/portals/knals/toenal/toenal_cb.c b/lustre/portals/knals/toenal/toenal_cb.c index f92511a..983fa71 100644 --- a/lustre/portals/knals/toenal/toenal_cb.c +++ b/lustre/portals/knals/toenal/toenal_cb.c @@ -371,7 +371,6 @@ ktoenal_launch_packet (ksock_conn_t *conn, ksock_tx_t *tx) for (;;) { LASSERT (niov <= tx->tx_niov); - LASSERT (iov->iov_len >= 0); if (iov->iov_len >= nob) { diff --git a/lustre/portals/portals/lib-me.c b/lustre/portals/portals/lib-me.c index bd1af5b..31ac214 100644 --- a/lustre/portals/portals/lib-me.c +++ b/lustre/portals/portals/lib-me.c @@ -44,7 +44,7 @@ int do_PtlMEAttach(nal_cb_t * nal, void *private, void *v_args, void *v_ret) unsigned long flags; lib_me_t *me; - if (args->index_in < 0 || args->index_in >= tbl->size) + if (args->index_in >= tbl->size) return ret->rc = PTL_INV_PTINDEX; /* Should check for valid matchid, but not yet */ diff --git a/lustre/portals/portals/lib-move.c b/lustre/portals/portals/lib-move.c index f710476..e73cbb8 100644 --- a/lustre/portals/portals/lib-move.c +++ b/lustre/portals/portals/lib-move.c @@ -305,8 +305,6 @@ lib_extract_iov (struct iovec *dst, lib_md_t *md, ptl_size_t frag_len; int dst_niov; - LASSERT (len >= 0); - LASSERT (offset >= 0); LASSERT (offset + len <= md->length); if (len == 0) /* no data => */ @@ -442,8 +440,6 @@ lib_extract_kiov (ptl_kiov_t *dst, lib_md_t *md, ptl_size_t frag_len; int dst_niov; - LASSERT (len >= 0); - LASSERT (offset >= 0); LASSERT (offset + len <= md->length); if (len == 0) /* no data => */ -- 1.8.3.1