1
1
Fork 0
mirror of https://github.com/NixOS/nix.git synced 2025-11-17 07:52:43 +01:00

Silence some warnings on GCC 4.9

This commit is contained in:
Eelco Dolstra 2014-12-12 17:14:28 +01:00
parent 46f3eb6fdd
commit b77037b8fd
4 changed files with 12 additions and 7 deletions

View file

@ -109,7 +109,7 @@ void RemoteStore::connectToDaemon()
applications... */
AutoCloseFD fdPrevDir = open(".", O_RDONLY);
if (fdPrevDir == -1) throw SysError("couldn't open current directory");
chdir(dirOf(socketPath).c_str());
if (chdir(dirOf(socketPath).c_str()) == -1) throw SysError("couldn't change current directory");
Path socketPathRel = "./" + baseNameOf(socketPath);
struct sockaddr_un addr;