diff options
-rw-r--r-- | app/xenodm/xenodm/auth.c | 9 | ||||
-rw-r--r-- | app/xenodm/xenodm/dm.c | 2 | ||||
-rw-r--r-- | app/xenodm/xenodm/session.c | 2 |
3 files changed, 6 insertions, 7 deletions
diff --git a/app/xenodm/xenodm/auth.c b/app/xenodm/xenodm/auth.c index 0f9528dfa..810f4cf79 100644 --- a/app/xenodm/xenodm/auth.c +++ b/app/xenodm/xenodm/auth.c @@ -160,10 +160,10 @@ CheckServerAuthDir (const char *path, struct stat *statb, int mode) { int r = stat(path, statb); - if (r != 0) { + if (r == -1) { if (errno == ENOENT) { r = mkdir(path, mode); - if (r < 0) { + if (r == -1) { LogError ("cannot make authentication directory %s: %s\n", path, _SysErrorMsg (errno)); } else { @@ -180,7 +180,6 @@ CheckServerAuthDir (const char *path, struct stat *statb, int mode) return -1; } } - return r; } @@ -251,7 +250,7 @@ MakeServerAuthFile (struct display *d, FILE ** file, uid_t uid, gid_t gid) snprintf (d->authFile, len, "%s/%s/%s/A%s-XXXXXX", authDir, authdir1, authdir2, cleanname); fd = mkstemp (d->authFile); - if (fd < 0) { + if (fd == -1) { LogError ("cannot make authentication file %s: %s\n", d->authFile, _SysErrorMsg (errno)); free (d->authFile); @@ -670,7 +669,7 @@ DefineSelf(FILE *file, Xauth *auth) int family, len; Debug("DefineSelf\n"); - if (getifaddrs(&ifap) < 0) + if (getifaddrs(&ifap) == -1) return; for (ifr = ifap; ifr != NULL; ifr = ifr->ifa_next) { len = sizeof(*(ifr->ifa_addr)); diff --git a/app/xenodm/xenodm/dm.c b/app/xenodm/xenodm/dm.c index 59a0307b7..aab2453e0 100644 --- a/app/xenodm/xenodm/dm.c +++ b/app/xenodm/xenodm/dm.c @@ -91,7 +91,7 @@ main (int argc, char **argv) exit (1); } if (debugLevel == 0 && daemonMode) { - if (daemon (0, 0) < 0) { + if (daemon (0, 0) == -1) { /* error */ LogError("daemon() failed, %s\n", _SysErrorMsg (errno)); exit(1); diff --git a/app/xenodm/xenodm/session.c b/app/xenodm/xenodm/session.c index 99ed59ba9..048d69586 100644 --- a/app/xenodm/xenodm/session.c +++ b/app/xenodm/xenodm/session.c @@ -334,7 +334,7 @@ StartClient ( Debug("login_fbtab %s %d\n", d->windowPath, geteuid()); login_fbtab(d->windowPath, pwd->pw_uid, pwd->pw_gid); } - if (setusercontext(NULL, pwd, pwd->pw_uid, LOGIN_SETALL) < 0) { + if (setusercontext(NULL, pwd, pwd->pw_uid, LOGIN_SETALL) == -1) { LogError ("setusercontext for \"%s\" failed: %s\n", name, _SysErrorMsg (errno)); return (0); |