diff options
| author | tb <> | 2020-09-25 11:25:31 +0000 |
|---|---|---|
| committer | tb <> | 2020-09-25 11:25:31 +0000 |
| commit | 357cfa7f79fd168fd805ca76c9f54f575474d01d (patch) | |
| tree | 4342c4b136f4e640859ac7973e7254825df4be1e | |
| parent | edbccda8f2ea7b1b6772f4e0d8a094341caef15d (diff) | |
| download | openbsd-357cfa7f79fd168fd805ca76c9f54f575474d01d.tar.gz openbsd-357cfa7f79fd168fd805ca76c9f54f575474d01d.tar.bz2 openbsd-357cfa7f79fd168fd805ca76c9f54f575474d01d.zip | |
KNF for a few comments and indent a label
| -rw-r--r-- | src/lib/libcrypto/ui/ui_lib.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/libcrypto/ui/ui_lib.c b/src/lib/libcrypto/ui/ui_lib.c index 5f893c5915..09522e716c 100644 --- a/src/lib/libcrypto/ui/ui_lib.c +++ b/src/lib/libcrypto/ui/ui_lib.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: ui_lib.c,v 1.43 2020/09/25 11:17:52 tb Exp $ */ | 1 | /* $OpenBSD: ui_lib.c,v 1.44 2020/09/25 11:25:31 tb Exp $ */ |
| 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL | 2 | /* Written by Richard Levitte (richard@levitte.org) for the OpenSSL |
| 3 | * project 2001. | 3 | * project 2001. |
| 4 | */ | 4 | */ |
| @@ -254,8 +254,10 @@ general_allocate_boolean(UI *ui, const char *prompt, const char *action_desc, | |||
| 254 | return -1; | 254 | return -1; |
| 255 | } | 255 | } |
| 256 | 256 | ||
| 257 | /* Returns the index to the place in the stack or -1 for error. Uses a | 257 | /* |
| 258 | direct reference to the prompt. */ | 258 | * Returns the index to the place in the stack or -1 for error. Uses a |
| 259 | * direct reference to the prompt. | ||
| 260 | */ | ||
| 259 | int | 261 | int |
| 260 | UI_add_input_string(UI *ui, const char *prompt, int flags, char *result_buf, | 262 | UI_add_input_string(UI *ui, const char *prompt, int flags, char *result_buf, |
| 261 | int minsize, int maxsize) | 263 | int minsize, int maxsize) |
| @@ -264,7 +266,7 @@ UI_add_input_string(UI *ui, const char *prompt, int flags, char *result_buf, | |||
| 264 | result_buf, minsize, maxsize, NULL); | 266 | result_buf, minsize, maxsize, NULL); |
| 265 | } | 267 | } |
| 266 | 268 | ||
| 267 | /* Same as UI_add_input_string(), excepts it takes a copy of the prompt */ | 269 | /* Same as UI_add_input_string(), excepts it takes a copy of the prompt. */ |
| 268 | int | 270 | int |
| 269 | UI_dup_input_string(UI *ui, const char *prompt, int flags, char *result_buf, | 271 | UI_dup_input_string(UI *ui, const char *prompt, int flags, char *result_buf, |
| 270 | int minsize, int maxsize) | 272 | int minsize, int maxsize) |
| @@ -453,7 +455,7 @@ UI_process(UI *ui) | |||
| 453 | } | 455 | } |
| 454 | } | 456 | } |
| 455 | 457 | ||
| 456 | err: | 458 | err: |
| 457 | if (ui->meth->ui_close_session && !ui->meth->ui_close_session(ui)) | 459 | if (ui->meth->ui_close_session && !ui->meth->ui_close_session(ui)) |
| 458 | return -1; | 460 | return -1; |
| 459 | return ok; | 461 | return ok; |
| @@ -545,9 +547,11 @@ UI_create_method(const char *name) | |||
| 545 | return ui_method; | 547 | return ui_method; |
| 546 | } | 548 | } |
| 547 | 549 | ||
| 548 | /* BIG FSCKING WARNING!!!! If you use this on a statically allocated method | 550 | /* |
| 549 | (that is, it hasn't been allocated using UI_create_method(), you deserve | 551 | * BIG FSCKING WARNING!!!! If you use this on a statically allocated method |
| 550 | anything Murphy can throw at you and more! You have been warned. */ | 552 | * (that is, it hasn't been allocated using UI_create_method(), you deserve |
| 553 | * anything Murphy can throw at you and more! You have been warned. | ||
| 554 | */ | ||
| 551 | void | 555 | void |
| 552 | UI_destroy_method(UI_METHOD *ui_method) | 556 | UI_destroy_method(UI_METHOD *ui_method) |
| 553 | { | 557 | { |
