Minor fix.
* mh/mhn.c (normalize_path): First arg is const char *. (store_handler): Avoid unnecessary allocations (and coredumps, if mhn-storage profile is not set.
Showing
2 changed files
with
9 additions
and
3 deletions
1 | 2008-07-19 Sergey Poznyakoff <gray@gnu.org.ua> | 1 | 2008-07-19 Sergey Poznyakoff <gray@gnu.org.ua> |
2 | 2 | ||
3 | Minor fix. | ||
4 | |||
5 | * mh/mhn.c (normalize_path): First arg is const char *. | ||
6 | (store_handler): Avoid unnecessary allocations (and coredumps, | ||
7 | if mhn-storage profile is not set. | ||
8 | |||
3 | Finish namespace cleanup in libsieve. | 9 | Finish namespace cleanup in libsieve. |
4 | 10 | ||
5 | * libsieve/actions.c, libsieve/comparator.c, libsieve/conf.c, | 11 | * libsieve/actions.c, libsieve/comparator.c, libsieve/conf.c, | ... | ... |
... | @@ -1512,7 +1512,7 @@ mhn_show () | ... | @@ -1512,7 +1512,7 @@ mhn_show () |
1512 | /* ***************************** Store Mode ****************************** */ | 1512 | /* ***************************** Store Mode ****************************** */ |
1513 | 1513 | ||
1514 | char * | 1514 | char * |
1515 | normalize_path (char *cwd, char *path) | 1515 | normalize_path (const char *cwd, char *path) |
1516 | { | 1516 | { |
1517 | int len; | 1517 | int len; |
1518 | char *p; | 1518 | char *p; |
... | @@ -1615,7 +1615,7 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding, | ... | @@ -1615,7 +1615,7 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding, |
1615 | && argv[i][0] == '=' | 1615 | && argv[i][0] == '=' |
1616 | && ++i < argc) | 1616 | && ++i < argc) |
1617 | { | 1617 | { |
1618 | name = normalize_path (xstrdup (dir), argv[i]); | 1618 | name = normalize_path (dir, argv[i]); |
1619 | break; | 1619 | break; |
1620 | } | 1620 | } |
1621 | } | 1621 | } |
... | @@ -1639,7 +1639,7 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding, | ... | @@ -1639,7 +1639,7 @@ store_handler (mu_message_t msg, msg_part_t part, char *type, char *encoding, |
1639 | && argv[i][0] == '=' | 1639 | && argv[i][0] == '=' |
1640 | && ++i < argc) | 1640 | && ++i < argc) |
1641 | { | 1641 | { |
1642 | name = normalize_path (xstrdup (dir), argv[i]); | 1642 | name = normalize_path (dir, argv[i]); |
1643 | break; | 1643 | break; |
1644 | } | 1644 | } |
1645 | } | 1645 | } | ... | ... |
-
Please register or sign in to post a comment