What is the reason to define macro this way:
#define test_errno(msg) do{if (errno) {perror(msg); exit(EXIT_FAILURE);}} while(0)
I mean what is the reason behind do{}while(0)
? Of course it will be done once only, zero is constant, cannot change to nonzero somehow, so why to use such construction?