Commit e8669a93 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Untabify.

parent 29e62e20
...@@ -772,28 +772,28 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return) ...@@ -772,28 +772,28 @@ parse_key(int c, gnc_t gnc, void *closure, struct key **key_return)
c = getword(c, &auth_type, gnc, closure); c = getword(c, &auth_type, gnc, closure);
if(c < -1 || auth_type == NULL) { if(c < -1 || auth_type == NULL) {
free(auth_type); free(auth_type);
goto error; goto error;
} }
if(strcmp(auth_type, "none") == 0) { if(strcmp(auth_type, "none") == 0) {
key->type = AUTH_TYPE_NONE; key->type = AUTH_TYPE_NONE;
} else if(strcmp(auth_type, "sha256") == 0) { } else if(strcmp(auth_type, "sha256") == 0) {
key->type = AUTH_TYPE_SHA256; key->type = AUTH_TYPE_SHA256;
} else if(strcmp(auth_type, "blake2s") == 0) { } else if(strcmp(auth_type, "blake2s") == 0) {
key->type = AUTH_TYPE_BLAKE2S; key->type = AUTH_TYPE_BLAKE2S;
} else { } else {
key->type = 0; key->type = 0;
free(auth_type); free(auth_type);
goto error; goto error;
} }
free(auth_type); free(auth_type);
} else if(strcmp(token, "value") == 0) { } else if(strcmp(token, "value") == 0) {
c = gethex(c, &key->value, &key->len, gnc, closure); c = gethex(c, &key->value, &key->len, gnc, closure);
if(c < -1 || key->value == NULL) if(c < -1 || key->value == NULL)
goto error; goto error;
} else { } else {
goto error; goto error;
} }
free(token); free(token);
} }
*key_return = key; *key_return = key;
return c; return c;
...@@ -1225,7 +1225,7 @@ parse_config_line(int c, gnc_t gnc, void *closure, ...@@ -1225,7 +1225,7 @@ parse_config_line(int c, gnc_t gnc, void *closure,
c = parse_key(c, gnc, closure, &key); c = parse_key(c, gnc, closure, &key);
if(c < -1 || key == NULL || key->id == NULL) { if(c < -1 || key == NULL || key->id == NULL) {
free(key); free(key);
goto fail; goto fail;
} }
switch(key->type) { switch(key->type) {
case AUTH_TYPE_SHA256: case AUTH_TYPE_SHA256:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment