]> git.cameronkatri.com Git - pw-darwin.git/blobdiff - chpass/chpass.c
Upgrade our copies of clang, llvm, lldb, compiler-rt and libc++ to 3.9.0
[pw-darwin.git] / chpass / chpass.c
index 2504e68ec17d9803f7f0a0c48d613f120100d78a..9f9be5335a682376d0d8063669fbae7f20d45670 100644 (file)
@@ -241,8 +241,11 @@ main(int argc, char *argv[])
 #ifdef YP
        case _PWF_NIS:
                ypclnt = ypclnt_new(yp_domain, "passwd.byname", yp_host);
-               if (ypclnt == NULL ||
-                   ypclnt_connect(ypclnt) == -1 ||
+               if (ypclnt == NULL) {
+                       warnx("ypclnt_new failed");
+                       exit(1);
+               }
+               if (ypclnt_connect(ypclnt) == -1 ||
                    ypclnt_passwd(ypclnt, pw, password) == -1) {
                        warnx("%s", ypclnt->error);
                        ypclnt_free(ypclnt);