Commit 8654bc9
doh: fix doh_encode's error return value
- Return 0 on doh_encode error. This makes the values returned on error
by doh_encode() consistent with the post-invocation test.
Prior to this change doh_encode, which returns a size_t of bytes
written on success, erroneously returned DOHcodes on error
(eg DOH_TOO_SMALL_BUFFER (4), ie 4 bytes written, which was wrong).
Fixes #40
Closes #411 parent 17fd81d commit 8654bc9
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
256 | 256 | | |
257 | 257 | | |
258 | 258 | | |
259 | | - | |
| 259 | + | |
260 | 260 | | |
261 | 261 | | |
262 | 262 | | |
| |||
284 | 284 | | |
285 | 285 | | |
286 | 286 | | |
287 | | - | |
| 287 | + | |
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
| |||
0 commit comments