]> diplodocus.org Git - nmh/blobdiff - uip/mhlogin.c
sizeof char is always 1, so don't bother to divide by it.
[nmh] / uip / mhlogin.c
index ffa44f3f0a3bee6ea0d499a34631c85e4d206513..1cc1c23ca7d581623dca9d4a958e2c24da04c1f9 100644 (file)
@@ -1,5 +1,4 @@
-/*
- * mhlogin.c -- login to external (OAuth) services
+/* mhlogin.c -- login to external (OAuth) services
  *
  * This code is Copyright (c) 2014, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -13,6 +12,7 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/oauth.h>
+#include "../sbr/lock_file.h"
 
 #define MHLOGIN_SWITCHES \
     X("user username", 0, USERSW) \
@@ -40,7 +40,7 @@ geta (void)
 
     if (fgets(line, sizeof(line), stdin) == NULL)
        done (1);
-    TrimSuffixC(line, '\n');
+    trim_suffix_c(line, '\n');
 
     return line;
 }
@@ -109,7 +109,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
       code = geta();
     }
     if (cred == NULL) {
-      advise(NULL, "error exchanging code for OAuth2 token");
+      inform("error exchanging code for OAuth2 token");
       adios(NULL, mh_oauth_get_err_string(ctx));
     }