'Make Fread run until there's not enough bytes

So what im asking is how to make fread function loop until left with not enough bytes to look at. Is this okay? : while(fread(buffer, 512, 1, image)) == 512 );

c


Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source