]> git.openpandora.org Git - pandora-libraries.git/commitdiff
fix fubar'd error check
authorGrazvydas Ignotas <notasas@gmail.com>
Fri, 12 Dec 2014 00:15:58 +0000 (02:15 +0200)
committerGrazvydas Ignotas <notasas@gmail.com>
Fri, 12 Dec 2014 00:15:58 +0000 (02:15 +0200)
always closing fd 0, which sometimes happens to be inotify fd, nice..

lib/pnd_utility.c

index b011cddb4535ba7b299334b9b34493da896b029e..17fb322a65c4e0390a616e3e875d05d315fc90ed 100644 (file)
@@ -375,7 +375,7 @@ unsigned char pnd_lock ( char *lockname ) {
 
   snprintf ( fullpath, PATH_MAX, "%s/%s", PND_LOCK_PATH, lockname );
 
-  if ( ( fd = creat ( fullpath, 0444 ) < 0 ) ) {
+  if ( ( fd = creat ( fullpath, 0444 ) ) < 0 ) {
     return ( 0 ); // error, yeah, I know, no way to know why it failed..
   }