Permalink
Browse files

Allow trust to be null since it's not used.

  • Loading branch information...
1 parent 4837eb8 commit a7732c98dfade9b86d415654381499be882794fd Caleb James DeLisle committed Mar 25, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 cjdroute.c
View
@@ -363,13 +363,13 @@ static void authorizedPassword(String* passwd,
index);
exit(-1);
}
- if (*trust < 0) {
+ if (trust && *trust < 0) {
fprintf(stderr, "authorizedPasswords[%u] trust cannot be negative.\n", index);
exit(-1);
}
printf("adding authorized password.\n");
struct User* u = ctx->allocator->malloc(sizeof(struct User), ctx->allocator);
- u->trust = (uint64_t) *trust;
+ u->trust = (trust) ? (uint64_t) *trust : 0;
CryptoAuth_addUser(passwd, *authType, u, ctx->ca);
}

0 comments on commit a7732c9

Please sign in to comment.