diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-14 20:18:41 +0300 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2010-04-14 20:19:10 +0300 |
commit | 16ea05b703d50a78dc017ebf0d9355257dc6e8a2 (patch) | |
tree | d16f525560fd70fd8ea9dd4c84a0285ba737a11c | |
parent | dbbf8dae0bdd56d108f8bfda7614b4a3b895eae2 (diff) | |
download | mailutils-16ea05b703d50a78dc017ebf0d9355257dc6e8a2.tar.gz mailutils-16ea05b703d50a78dc017ebf0d9355257dc6e8a2.tar.bz2 |
Improve mu_mimehdr_a?get_disp.
* mailbox/mimehdr.c (mu_mimehdr_get_disp)
(mu_mimehdr_aget_disp): Return disposition even if
no parameters have been given.
-rw-r--r-- | mailbox/mimehdr.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/mailbox/mimehdr.c b/mailbox/mimehdr.c index cd38332dd..4c273587d 100644 --- a/mailbox/mimehdr.c +++ b/mailbox/mimehdr.c @@ -338,8 +338,9 @@ mu_mimehdr_get_disp (const char *str, char *buf, size_t bufsz, size_t *retsz) size_t size; if (!p) - return MU_ERR_NOENT; - size = p - str; + size = strlen (str); + else + size = p - str; if (buf) size = mu_cpystr (buf, str, size); if (retsz) @@ -355,8 +356,9 @@ mu_mimehdr_aget_disp (const char *str, char **pvalue) size_t size; if (!p) - return MU_ERR_NOENT; - size = p - str; + size = strlen (str); + else + size = p - str; p = malloc (size + 1); if (!p) return ENOMEM; |