| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/err/err_prn.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | void | - | ||||||||||||
| 5 | ERR_print_errors_cb(int (*cb)(const char *str, size_t len, void *u), void *u) | - | ||||||||||||
| 6 | { | - | ||||||||||||
| 7 | unsigned long l; | - | ||||||||||||
| 8 | char buf[256]; | - | ||||||||||||
| 9 | char buf2[4096]; | - | ||||||||||||
| 10 | const char *file, *data; | - | ||||||||||||
| 11 | int line, flags; | - | ||||||||||||
| 12 | unsigned long es; | - | ||||||||||||
| 13 | CRYPTO_THREADID cur; | - | ||||||||||||
| 14 | - | |||||||||||||
| 15 | CRYPTO_THREADID_current(&cur); | - | ||||||||||||
| 16 | es = CRYPTO_THREADID_hash(&cur); | - | ||||||||||||
| 17 | while ((
| 0-285 | ||||||||||||
| 18 | &flags)) != 0
| 0-285 | ||||||||||||
| 19 | ERR_error_string_n(l, buf, sizeof buf); | - | ||||||||||||
| 20 | (void) snprintf(buf2, sizeof(buf2), "%lu:%s:%s:%d:%s\n", es, | - | ||||||||||||
| 21 | buf, file, line, (flags & 0x02) ? data : ""); | - | ||||||||||||
| 22 | if (cb(buf2, strlen(buf2), u) <= 0
| 0 | ||||||||||||
| 23 | break; never executed: break; | 0 | ||||||||||||
| 24 | } never executed: end of block | 0 | ||||||||||||
| 25 | } executed 285 times by 6 tests: end of blockExecuted by:
| 285 | ||||||||||||
| 26 | - | |||||||||||||
| 27 | static int | - | ||||||||||||
| 28 | print_fp(const char *str, size_t len, void *fp) | - | ||||||||||||
| 29 | { | - | ||||||||||||
| 30 | BIO bio; | - | ||||||||||||
| 31 | - | |||||||||||||
| 32 | BIO_set(&bio, BIO_s_file()); | - | ||||||||||||
| 33 | BIO_ctrl(&bio,106,0x00,(char *)fp); | - | ||||||||||||
| 34 | - | |||||||||||||
| 35 | return never executed: BIO_printf(&bio, "%s", str);return BIO_printf(&bio, "%s", str);never executed: return BIO_printf(&bio, "%s", str); | 0 | ||||||||||||
| 36 | } | - | ||||||||||||
| 37 | - | |||||||||||||
| 38 | void | - | ||||||||||||
| 39 | ERR_print_errors_fp(FILE *fp) | - | ||||||||||||
| 40 | { | - | ||||||||||||
| 41 | ERR_print_errors_cb(print_fp, fp); | - | ||||||||||||
| 42 | } executed 17 times by 2 tests: end of blockExecuted by:
| 17 | ||||||||||||
| 43 | - | |||||||||||||
| 44 | static int | - | ||||||||||||
| 45 | print_bio(const char *str, size_t len, void *bp) | - | ||||||||||||
| 46 | { | - | ||||||||||||
| 47 | return never executed: BIO_write((BIO *)bp, str, len);return BIO_write((BIO *)bp, str, len);never executed: return BIO_write((BIO *)bp, str, len); | 0 | ||||||||||||
| 48 | } | - | ||||||||||||
| 49 | - | |||||||||||||
| 50 | void | - | ||||||||||||
| 51 | ERR_print_errors(BIO *bp) | - | ||||||||||||
| 52 | { | - | ||||||||||||
| 53 | ERR_print_errors_cb(print_bio, bp); | - | ||||||||||||
| 54 | } executed 268 times by 4 tests: end of blockExecuted by:
| 268 | ||||||||||||
| Switch to Source code | Preprocessed file |