properly handle return codes
[project/fstools.git] / libblkid-tiny / mkdev.c
index 3d067b2..f1d504f 100644 (file)
@@ -12,7 +12,7 @@
  * GNU General Public License for more details.
  */
 
-#define _BSD_SOURCE
+#define _DEFAULT_SOURCE
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -88,7 +88,6 @@ int mkblkdev(void)
 
        mode = 0600;
        find_devs(true);
-       chdir("/");
 
-       return 0;
+       return chdir("/");
 }