]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
sfxge: add prefast annotation to common code return types
authorAndrew Rybchenko <arybchik@FreeBSD.org>
Sun, 29 Nov 2015 05:42:49 +0000 (05:42 +0000)
committerAndrew Rybchenko <arybchik@FreeBSD.org>
Sun, 29 Nov 2015 05:42:49 +0000 (05:42 +0000)
commit460cb5684c2e5be7cfa244dd4c970c56259edfaf
treea64f36277d01411a055e38cec9b3541c6ea3214e
parentc56cfc95535b48233a30ec36512d478fb4fb120b
sfxge: add prefast annotation to common code return types

Using a typedef for common code return types (rather than "int")
allows the Prefast static analyser to understand when a function
has been successful (and thus when its postconditions must hold).

This greatly reduces then number of false positives reported by
prefast for error paths in common code functions.

Submitted by:   Andy Moreton <amoreton at solarflare.com>
Sponsored by:   Solarflare Communications, Inc.
MFC after:      2 days
43 files changed:
sys/dev/sfxge/common/efsys.h
sys/dev/sfxge/common/efx.h
sys/dev/sfxge/common/efx_bootcfg.c
sys/dev/sfxge/common/efx_ev.c
sys/dev/sfxge/common/efx_filter.c
sys/dev/sfxge/common/efx_impl.h
sys/dev/sfxge/common/efx_intr.c
sys/dev/sfxge/common/efx_mac.c
sys/dev/sfxge/common/efx_mcdi.c
sys/dev/sfxge/common/efx_mcdi.h
sys/dev/sfxge/common/efx_mon.c
sys/dev/sfxge/common/efx_nic.c
sys/dev/sfxge/common/efx_nvram.c
sys/dev/sfxge/common/efx_phy.c
sys/dev/sfxge/common/efx_port.c
sys/dev/sfxge/common/efx_rx.c
sys/dev/sfxge/common/efx_sram.c
sys/dev/sfxge/common/efx_tx.c
sys/dev/sfxge/common/efx_vpd.c
sys/dev/sfxge/common/efx_wol.c
sys/dev/sfxge/common/hunt_ev.c
sys/dev/sfxge/common/hunt_filter.c
sys/dev/sfxge/common/hunt_impl.h
sys/dev/sfxge/common/hunt_intr.c
sys/dev/sfxge/common/hunt_mac.c
sys/dev/sfxge/common/hunt_mcdi.c
sys/dev/sfxge/common/hunt_nic.c
sys/dev/sfxge/common/hunt_nvram.c
sys/dev/sfxge/common/hunt_phy.c
sys/dev/sfxge/common/hunt_rx.c
sys/dev/sfxge/common/hunt_sram.c
sys/dev/sfxge/common/hunt_tx.c
sys/dev/sfxge/common/hunt_vpd.c
sys/dev/sfxge/common/mcdi_mon.c
sys/dev/sfxge/common/mcdi_mon.h
sys/dev/sfxge/common/siena_impl.h
sys/dev/sfxge/common/siena_mac.c
sys/dev/sfxge/common/siena_mcdi.c
sys/dev/sfxge/common/siena_nic.c
sys/dev/sfxge/common/siena_nvram.c
sys/dev/sfxge/common/siena_phy.c
sys/dev/sfxge/common/siena_sram.c
sys/dev/sfxge/common/siena_vpd.c