Distributed Replicated Block Device (DRBD) development
 help / color / mirror / Atom feed
* [Drbd-dev] avoid use of errno as a function parameter name
@ 2019-06-05 16:14 David Butterfield
  2019-06-12 14:11 ` Lars Ellenberg
  0 siblings, 1 reply; 4+ messages in thread
From: David Butterfield @ 2019-06-05 16:14 UTC (permalink / raw)
  To: drbd-dev

Avoid use of errno as an argument name because it is allowed to be a macro such as
    # define errno (*__errno_location ())

diff --git a/drbd_wrappers.h b/drbd_wrappers.h
-static inline blk_status_t errno_to_blk_status(int errno)
+static inline blk_status_t errno_to_blk_status(int _errno)
 {
        blk_status_t status =
-               errno == 0 ? BLK_STS_OK :
-               errno == -ENOMEM ? BLK_STS_RESOURCE :
-               errno == -EOPNOTSUPP ? BLK_STS_NOTSUPP :
+               _errno == 0 ? BLK_STS_OK :
+               _errno == -ENOMEM ? BLK_STS_RESOURCE :
+               _errno == -EOPNOTSUPP ? BLK_STS_NOTSUPP :
                BLK_STS_IOERR;

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-06-18  8:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-05 16:14 [Drbd-dev] avoid use of errno as a function parameter name David Butterfield
2019-06-12 14:11 ` Lars Ellenberg
2019-06-14  9:49   ` Robert Altnoeder
2019-06-18  8:47     ` [Drbd-dev] running DRBD in usermode David Butterfield

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox