]> diplodocus.org Git - nmh/blobdiff - uip/mhlogin.c
Edit out a few more tautological `the foo(5) man page'.
[nmh] / uip / mhlogin.c
index 1cc1c23ca7d581623dca9d4a958e2c24da04c1f9..aee2c1eb6132da9ea7405f695f2abdaf262a2378 100644 (file)
@@ -12,7 +12,7 @@
 #include <h/mh.h>
 #include <h/utils.h>
 #include <h/oauth.h>
-#include "../sbr/lock_file.h"
+#include "sbr/lock_file.h"
 
 #define MHLOGIN_SWITCHES \
     X("user username", 0, USERSW) \
@@ -64,17 +64,17 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
     }
 
     if (!mh_oauth_new(&ctx, svc)) {
-        adios(NULL, mh_oauth_get_err_string(ctx));
+        adios(NULL, "%s", mh_oauth_get_err_string(ctx));
     }
 
     if (snoop) {
         mh_oauth_log_to(stderr, ctx);
     }
 
-    fn = mh_xstrdup(mh_oauth_cred_fn(svc));
+    fn = mh_oauth_cred_fn(svc);
 
     if ((url = mh_oauth_get_authorize_url(ctx)) == NULL) {
-      adios(NULL, mh_oauth_get_err_string(ctx));
+      adios(NULL, "%s", mh_oauth_get_err_string(ctx));
     }
 
     if (browser) {
@@ -110,7 +110,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
     }
     if (cred == NULL) {
       inform("error exchanging code for OAuth2 token");
-      adios(NULL, mh_oauth_get_err_string(ctx));
+      adios(NULL, "%s", mh_oauth_get_err_string(ctx));
     }
 
     cred_file = lkfopendata(fn, "r+", &failed_to_lock);
@@ -121,7 +121,7 @@ do_login(const char *svc, const char *user, const char *browser, int snoop)
       adios(fn, "oops");
     }
     if (!mh_oauth_cred_save(cred_file, cred, user)) {
-      adios(NULL, mh_oauth_get_err_string(ctx));
+      adios(NULL, "%s", mh_oauth_get_err_string(ctx));
     }
     if (lkfclosedata(cred_file, fn) != 0) {
       adios (fn, "oops");