[pkg-fso-commits] [SCM] gpsd for fso branch, master, updated. v0.8-2-g78fe48d

Sascha Wessel wessel at nefkom.net
Mon Feb 2 18:55:04 UTC 2009


The following commit has been merged in the master branch:
commit 3e8cb61a7956e658dc2ea394e6177c75f59fb75d
Author: Sascha Wessel <wessel at nefkom.net>
Date:   Thu Dec 11 12:45:54 2008 +0100

    Fixed compilation warning:
    
    ignoring return value of ‘chdir’, declared with
    attribute warn_unused_result

diff --git a/ChangeLog b/ChangeLog
index d5453b6..533d691 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+fso-gpsd 0.9
+	* Fixed compilation warning: ignoring return value of ‘chdir’,
+	  declared with attribute warn_unused_result
+
 fso-gpsd 0.8 - 2008-12-06
 	* Improved logging
 	* Optimization
diff --git a/fso-gpsd.c b/fso-gpsd.c
index d105c8f..53e3cb6 100644
--- a/fso-gpsd.c
+++ b/fso-gpsd.c
@@ -2465,7 +2465,10 @@ main(int argc, char **argv)
 		background = TRUE;
 
 		setsid();
-		chdir("/");
+
+		if (chdir("/")) {
+			ERROR("Cannot chdir: /: %s", strerror(errno));
+		}
 
 		fd = open("/dev/null", O_RDWR, 0);
 

-- 
gpsd for fso



More information about the pkg-fso-commits mailing list