E17: Patch from Maxime Villard (rustyBSD)
authorVincent Torri <vincent.torri@gmail.com>
Sat, 22 Sep 2012 12:04:42 +0000 (12:04 +0000)
committerVincent Torri <vincent.torri@gmail.com>
Sat, 22 Sep 2012 12:04:42 +0000 (12:04 +0000)
commit7f93d7305bf2e8a79247a2edd40d9bf4c5e164dd
treef722fadf2b5417b5bd49f64744420572c610955a
parent0698d74a6a5a0a2c6be1a7003ee048b62fba3b6e
E17: Patch from Maxime Villard (rustyBSD)

I.
    (strncmp(p, p2, PATH_MAX) == 0) &&
    ((p[p2_len] == '/') || (p[p2_len] == '\0')))

Here we want to know if p and p2 are the same.
It's easier to do a simple 'strcmp(p, p2)', and it's
useless to check the value of p[p2_len], because if
p = p2, p[p2_len] will always be \0.

II. Check the string as for E_FM_OP_MOVE.

III. Just a simplification.
it was something like:
    if (type == E_FM_OP_COPY)
        X;
    if (type == E_FM_OP_COPY)
        Y;
    else ...

I just replaced by
    if (type == E_FM_OP_COPY)
    {
        X;
        Y;
    }
    else ...

SVN revision: 77015
src/bin/e_fm_op.c