Bug 207856 - usr/src/sys/geom/vinum/geom_vinum_raid5.c: 2 * bad test ?
Summary: usr/src/sys/geom/vinum/geom_vinum_raid5.c: 2 * bad test ?
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-09 19:34 UTC by David Binderman
Modified: 2016-03-09 19:34 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Binderman 2016-03-09 19:34:00 UTC
1.

usr/src/sys/geom/vinum/geom_vinum_raid5.c:602]: (style) A pointer can not be negative so it is either pointless or an error to check if it is not.

source code is

    KASSERT(psdno >= 0, ("gv_raid5_offset: psdno < 0"));

but

gv_raid5_offset(struct gv_plex *p, off_t boff, off_t bcount, off_t *real_off,
    off_t *real_len, int *sdno, int *psdno, int growing)

2.

usr/src/sys/geom/vinum/geom_vinum_raid5.c:610]: (style) A pointer can not be negative so it is either pointless or an error to check if it is not.

Source code is

    KASSERT(sdno >= 0, ("gv_raid5_offset: sdno < 0"));

Duplicate.