mirror of
https://github.com/ipxe/ipxe
synced 2025-12-28 02:28:57 +03:00
Change read_bit() to return 0 or -1UL, rather than 0 or 1.
This commit is contained in:
@@ -48,8 +48,10 @@ void write_bit ( struct bit_basher *basher, unsigned int bit_id,
|
||||
* @v bit_id Bit number
|
||||
* @ret data Value read
|
||||
*
|
||||
* @c data will always be either 0 or 1.
|
||||
* @c data will always be either 0 or -1UL. The idea is that the
|
||||
* caller can simply binary-AND the returned value with whatever mask
|
||||
* it needs to apply.
|
||||
*/
|
||||
int read_bit ( struct bit_basher *basher, unsigned int bit_id ) {
|
||||
return ( basher->read ( basher, bit_id ) ? 1 : 0 );
|
||||
return ( basher->read ( basher, bit_id ) ? -1UL : 0 );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user