X-Git-Url: https://git.exim.org/exim.git/blobdiff_plain/dd4c8678de8ed13eedcf543b301b92216f6352de..2382cd3e81838709abd3b0c1b410f65274d90e25:/test/src/fd.c?ds=sidebyside diff --git a/test/src/fd.c b/test/src/fd.c index 2dc12c6a7..fc3a54456 100644 --- a/test/src/fd.c +++ b/test/src/fd.c @@ -65,28 +65,21 @@ for (fd = 0; fd <= mac_maxfd; fd++) p += sprintf(p, "%3d opt=%d status=%X ", fd, options, status); switch(status & 3) { - case 0: p += sprintf(p, "RDONLY"); - break; - case 1: p += sprintf(p, "WRONLY"); - break; - case 2: p += sprintf(p, "RDWR"); - break; + case O_RDONLY: p += sprintf(p, "RDONLY"); break; + case O_WRONLY: p += sprintf(p, "WRONLY"); break; + case O_RDWR: p += sprintf(p, "RDWR"); break; } if (isatty(fd)) p += sprintf(p, " TTY"); if ((status & 8) != 0) p += sprintf(p, " APPEND"); if (use_stat && fstat(fd, &statbuf) >= 0) - { p += sprintf(p, " mode=%o uid=%d size=%d", (int)statbuf.st_mode, (int)statbuf.st_uid, (int)statbuf.st_size); - } p += sprintf(p, "\n"); } else if (errno != EBADF) - { p += sprintf(p, "%3d errno=%d %s\n", fd, errno, strerror(errno)); - } } if (qpgm)