fixed add-token / list-token tools
authorNiklas Cathor <nilclass@riseup.net>
Sat, 31 Aug 2013 12:19:38 +0000 (14:19 +0200)
committerNiklas Cathor <nilclass@riseup.net>
Sat, 31 Aug 2013 12:19:38 +0000 (14:19 +0200)
src/tools/add-token.c
src/tools/list-tokens.c

index eccbbd1..31e130e 100644 (file)
@@ -34,7 +34,7 @@ int main(int argc, char **argv) {
   auth.token = argv[2];
   char *scope_string;
   auth.scopes.count = argc - 3;
-  auth.scopes.ptr = malloc(sizeof(struct rs_scope) * auth.scopes.count);
+  auth.scopes.ptr = malloc(sizeof(struct rs_scope*) * auth.scopes.count);
   if(! auth.scopes.ptr) {
     perror("Failed to allocate memory");
     exit(EXIT_FAILURE);
index d9c8128..163bbcf 100644 (file)
@@ -16,6 +16,6 @@
 
 int main(int argc, char **argv) {
   open_authorizations("r");
-  list_authorizations(argc > 1 ? argv[1] : NULL);
+  print_authorizations(argc > 1 ? argv[1] : NULL);
   close_authorizations();
 }