| 403 | } |
| 404 | |
| 405 | static inline bencode_item_t *bencode_dictionary_add_str(bencode_item_t *dict, const char *key, const str *val) { |
| 406 | if (!val) |
| 407 | return NULL; |
| 408 | return bencode_dictionary_add(dict, key, bencode_str(bencode_item_buffer(dict), val)); |
| 409 | } |
| 410 | |
| 411 | static inline bencode_item_t *bencode_dictionary_add_str_dup(bencode_item_t *dict, const char *key, const str *val) { |
| 412 | if (!val) |
no test coverage detected