/*
 * این کد برای نشان دادن یک منطق اشتباه نوشته شده است.
 */

#include <stdio.h>
#include <stdlib.h>
#include <pwd.h>
#include <errno.h>

int
main(int argc, char *argv[])
{
    struct passwd *pw;

    errno = 1;
    pw = getpwnam("mstafreshii");
    if (pw == NULL) {
        if (errno == 1)         // خطای منطق اینجاست
            printf("not found\n");
        else
            printf("error\n");
    }

    exit(EXIT_SUCCESS);
}
