Hey Mario,

> -     p = crypt(inpass, prevhash);
> -     if (!p)
> -             eprintf("crypt:");
> -     if (cryptpass1 && strcmp(cryptpass1, p) == 0)
> -             eprintf("password left unchanged\n");
> +     if (cryptpass1) {

            ^--- for more clarity, maybe check against prevhash instead?

> +             p = crypt(inpass, prevhash);
> +             if (!p)
> +                     eprintf("crypt:");
> +             if (strcmp(cryptpass1, p) == 0)
> +                     eprintf("password left unchanged\n");
> +     }

Reply via email to