X-Git-Url: https://diplodocus.org/git/nmh/blobdiff_plain/b9dda34301de552ad6413e4dd022114fd5219cc9..fc31cece06f633567cbf4432e4ec5ab0402a5a20:/uip/mhlogin.c diff --git a/uip/mhlogin.c b/uip/mhlogin.c index aabe9a3d..56b1e36f 100644 --- a/uip/mhlogin.c +++ b/uip/mhlogin.c @@ -101,10 +101,10 @@ do_login(const char *svc, const char *user, const char *browser, int snoop) fflush(stdout); code = geta(); - while (strlen(code) == 0 || + while (!*code || || ((cred = mh_oauth_authorize(code, ctx)) == NULL && mh_oauth_get_err_code(ctx) == MH_OAUTH_BAD_GRANT)) { - printf(strlen(code) == 0 ? "Empty code; try again? " : "Code rejected; try again? "); + printf(!*code ? "Empty code; try again? " : "Code rejected; try again? "); fflush(stdout); code = geta(); }