On Thu, 2007-06-07 at 15:49 +0200, Anders Blomdell wrote: > As per request from discussions in > https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=241780 > a patch against git. > > Best regards > > Anders Blomdell > plain text document attachment (alarm_handler.patch) > --- autofs/lib/alarm.c 2007-06-07 15:05:03.000000000 +0200 > +++ /usr/src/autofs/autofs.patched/lib/alarm.c 2007-06-07 > 15:08:29.000000000 +0200 > @@ -28,16 +28,16 @@ > > #define alarm_lock() \ > do { \ > - int _alm_lock = pthread_mutex_lock(&mutex); \ > - if (_alm_lock) \ > - fatal(_alm_lock); \ > + int status = pthread_mutex_lock(&mutex); \ > + if (status) \ > + fatal(status); \ > } while (0) > > #define alarm_unlock() \ > do { \ > - int _alm_unlock = pthread_mutex_unlock(&mutex); \ > - if (_alm_unlock) \ > - fatal(_alm_unlock); \ > + int status = pthread_mutex_unlock(&mutex); \ > + if (status) \ > + fatal(status); \ > } while (0)
This isn't related to what your proposing. A separate patch would have been better for this so that we could discuss it independently of the alarm_handler patch. This patch hunk reverts the code to what I originally wrote. It was changed due to complaints about compile warning about reused symbol names and "the right thing to do for readability". Personally I prefer it this way but I'm not going to change this again. Ian _______________________________________________ autofs mailing list [email protected] http://linux.kernel.org/mailman/listinfo/autofs
