Arjen de Korte
2011-Jun-28 18:57 UTC
[Nut-upsdev] [nut-commits] svn commit r3081 - branches/apcsmart-dev/drivers
Citeren Michal Soltys <msoltyspl-guest at alioth.debian.org>:> @@ -251,14 +251,14 @@ > if (do_lock_port) { > errno = 0; > ret = 0; > -#ifdef HAVE_UU_LOCK > + #ifdef HAVE_UU_LOCK > ret = uu_lock(xbasename(device_path)); > -#elif defined(HAVE_FLOCK) > + #elif defined(HAVE_FLOCK) > ret = flock(fd, LOCK_EX | LOCK_NB); > -#elif defined(HAVE_LOCKF) > + #elif defined(HAVE_LOCKF) > lseek(fd, 0L, SEEK_SET); > ret = lockf(fd, F_TLOCK, 0L); > -#endif > + #endif > if (ret < 0) > upslog_with_errno(LOG_ERR, "apc_ser_try: couldn't lock the port > (%s)", device_path); > }Trivial - preprocessor directives are *not* C-code and should start in column 1 (and not inlined with the code) for clarity. So it was actually correct before this commit... :-) Best regards, Arjen -- Please keep list traffic on the list (off-list replies will be rejected)
Seemingly Similar Threads
- [PATCH] nut crashes when port= is omitted
- [PATCH] misc compile fixes for tools on Solaris
- [nut-commits] svn commit r3104 - branches/apcsmart-dev/drivers
- [nut-commits] svn commit r3071 - branches/apcsmart-dev/drivers
- Proposal for technique to stop a timer at any moment