From: Niklas Cathor Date: Sun, 28 Jul 2013 20:42:19 +0000 (+0200) Subject: tweak X-Git-Url: http://git.arpa2.org/?p=krsd;a=commitdiff_plain;h=8f409172d00da2db4353437e0028c969f2661f95 tweak --- diff --git a/src/tools/remove-token.c b/src/tools/remove-token.c index 128c917..4143b3f 100644 --- a/src/tools/remove-token.c +++ b/src/tools/remove-token.c @@ -10,11 +10,16 @@ * along with this program. If not, see . */ +#define _GNU_SOURCE + #include -#include -#include #include #include +#include +#include +#include +#include +#include #include "common/auth.h" @@ -31,9 +36,8 @@ int main(int argc, char **argv) { struct rs_authorization auth; auth.username = argv[1]; auth.token = argv[2]; - auth.scopes = NULL; int success = remove_authorization(&auth); close_authorizations(); - fprintf(stderr, (success == 0) ? "Token removed.\n" : "Token not found!\n"); + fprintf(stderr, (success == DB_NOTFOUND) ? "Token not found!\n" : (success == 0 ? "Token removed.\n" : "Error removing token!\n")); return success; }