commit f4240761f162ab9693c3bb64bca4bc22f411f911 Author: Oswald Buddenhagen <o...@users.sf.net> Date: Sun Feb 15 11:38:26 2015 +0100
introduce and use pending_wakeup() so we don't need to peek into internal data structures. src/common.h | 1 + src/drv_maildir.c | 2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/src/common.h b/src/common.h index f9454cb..06c2e3e 100644 --- a/src/common.h +++ b/src/common.h @@ -164,6 +164,7 @@ typedef struct { void init_wakeup( wakeup_t *tmr, void (*cb)( void * ), void *aux ); void conf_wakeup( wakeup_t *tmr, int timeout ); void wipe_wakeup( wakeup_t *tmr ); +static INLINE int pending_wakeup( wakeup_t *tmr ) { return tmr->links.next != 0; } void main_loop( void ); diff --git a/src/drv_maildir.c b/src/drv_maildir.c index f6fa0c5..27073eb 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -529,7 +529,7 @@ maildir_uidval_lock( maildir_store_t *ctx ) #endif char buf[128]; - if (ctx->lcktmr.links.next) { + if (pending_wakeup( &ctx->lcktmr )) { /* The unlock timer is active, so we are obviously already locked. */ return DRV_OK; } ------------------------------------------------------------------------------ Dive into the World of Parallel Programming. The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel