|
From: <bo...@us...> - 2009-11-01 12:05:19
|
Revision: 449
http://gearbox.svn.sourceforge.net/gearbox/?rev=449&view=rev
Author: borax00
Date: 2009-11-01 12:05:08 +0000 (Sun, 01 Nov 2009)
Log Message:
-----------
Fix for problem noticed by Anup.
Modified Paths:
--------------
gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp
Modified: gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp
===================================================================
--- gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp 2009-10-28 13:16:07 UTC (rev 448)
+++ gearbox/trunk/src/gbxserialacfr/lockfile/lockfile.cpp 2009-11-01 12:05:08 UTC (rev 449)
@@ -154,10 +154,10 @@
FILE *fd;
char lbuf[260];
int pidOfLocker = 0;
- char *p;
- if ((p = strrchr(dev, '/')))
- dev = p + 1;
+ const char *lastSlashPos = strrchr(dev, '/');
+ if ( lastSlashPos )
+ dev = lastSlashPos + 1;
sprintf(lbuf, "%s/LCK..%s", LOCK_DIR, dev);
fd = fopen(lbuf, "r");
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|