Revision 49e92878

View differences:

libavutil/random_seed.c
31 31
    if ((fd = open("/dev/random", O_RDONLY)) == -1)
32 32
        fd = open("/dev/urandom", O_RDONLY);
33 33
    if (fd != -1){
34
        read(fd, &seed, 4);
34
        int err = read(fd, &seed, 4);
35 35
        close(fd);
36
        if (err == 4)
36 37
        return seed;
37 38
    }
38 39
#ifdef AV_READ_TIME

Also available in: Unified diff