]> andersk Git - moira.git/blobdiff - clients/passwd/chfn.c
*** empty log message ***
[moira.git] / clients / passwd / chfn.c
index 7942930fb28783a214d8729eddf542500c2cf4c4..c791c62c8a0ae8b42e05db3726c662d956094068 100644 (file)
@@ -28,7 +28,7 @@ static char *rcsid_chfn_c = "$Header$";
 
 #include <sys/types.h>
 #include <stdio.h>
-#include <strings.h>
+#include <string.h>
 #include <sys/file.h>
 #include <krb.h>
 #include <ctype.h>
@@ -63,7 +63,7 @@ main(argc, argv)
     int k_errno;
     char *whoami;
 
-    if ((whoami = rindex(argv[0], '/')) == NULL)
+    if ((whoami = strrchr(argv[0], '/')) == NULL)
        whoami = argv[0];
     else
        whoami++;
@@ -129,13 +129,13 @@ chfn(uname)
 
     status = mr_connect(NULL);
     if (status) {
-       com_err(whoami, status, " while connecting to Moira");
+       com_err(whoami, status, "while connecting to Moira");
        exit(1);
     }
 
     status = mr_motd(&motd);
     if (status) {
-        com_err(whoami, status, " unable to check server status");
+        com_err(whoami, status, "unable to check server status");
        leave(1);
     }
     if (motd) {
@@ -146,7 +146,7 @@ chfn(uname)
     status = mr_auth("chfn");  /* Don't use argv[0] - too easy to fake */
     if (status) {
        com_err(whoami, status, 
-               " while authenticating -- run \"kinit\" and try again.");
+               "while authenticating -- run \"kinit\" and try again.");
        leave(1);
     }
 
@@ -171,7 +171,7 @@ chfn(uname)
     if (status = mr_query("get_finger_by_login", q_argc, q_argv, 
                       get_user_info, (char *) &old_info))
     {
-       com_err(whoami, status, " while getting user information.");
+       com_err(whoami, status, "while getting user information.");
        leave(2);
     }
 
@@ -197,7 +197,7 @@ chfn(uname)
     if (status = mr_query("update_finger_by_login", q_argc, q_argv,
                           scream, (char *)NULL))
     {
-       com_err(whoami, status, " while updating finger information.");
+       com_err(whoami, status, "while updating finger information.");
        leave(1);
     }
 
@@ -334,7 +334,7 @@ void get_new_info(old_info, new_info)
     GETINFO("Office address (Exs: E40-342 or 2-108)", 
            office_address, FALSE);
     GETINFO("Office phone (Ex: 3-1300)", office_phone, TRUE);
-    GETINFO("MIT department (Exs: 9, Biology, Information Services", 
+    GETINFO("MIT department (Exs: 9, Biology, Information Services)", 
            mit_department, FALSE);
     GETINFO("MIT year (Exs: 1989, '91, Faculty, Grad)", mit_year, FALSE);
 }
This page took 0.055106 seconds and 4 git commands to generate.