Hi Steffen,

> +      soll = (i > 0 && cbuf[i - 1] == '/');
> +      if(which_protocol(cbuf) == PROTO_IMAP){
> +         bool_t hpath;
> +
> +         hpath = (strcmp(cbuf, protbase(cbuf)) != 0);
> +         res = str_concat_csvl(&s, cbuf, (hpath || soll ? "" : "/"),
> +               &res[1], NULL)->s;
> +      }else
> +         res = str_concat_csvl(&s, cbuf, (soll ? "" : "/"), &res[1], 
> NULL)->s;

It occurs to me that the two assignments to res are nearly identical.
Perhaps

    bool_t hpath;

    soll = i > 0 && cbuf[i - 1] == '/';
    hpath = which_protocol(cbuf) == PROTO_IMAP &&
        strcmp(cbuf, protbase(cbuf)) != 0;
    res = str_concat_csvl(&s, cbuf, (soll || hpath ? "" : "/"), &res[1], 
NULL)->s;

-- 
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
__________________________________
[email protected]

Reply via email to