Print only the complete information if the fd is valid itself (in
is_valid_fd).
Modified: trunk/reactos/lib/crt/io/open.c
_____
Modified: trunk/reactos/lib/crt/io/open.c
--- trunk/reactos/lib/crt/io/open.c 2005-09-10 15:30:21 UTC (rev
17780)
+++ trunk/reactos/lib/crt/io/open.c 2005-09-10 15:36:35 UTC (rev
17781)
@@ -99,8 +99,15 @@
BOOL b = (fd >= 0 && fd < g_fdend && (fdinfo(fd)->fdflags
& FOPEN));
if (!b){
- DPRINT1("not valid fd %i, g_fdend %i, fdinfo %x, bucket %x,
fdflags %x\n",
- fd,g_fdend,fdinfo(fd),fdinfo_bucket(fd),fdinfo(fd)->fdflags);
+ if (fd >= 0 && fd < g_fdend)
+ {
+ DPRINT1("not valid fd %i, g_fdend %i, fdinfo %x, bucket %x,
fdflags %x\n",
+
fd,g_fdend,fdinfo(fd),fdinfo_bucket(fd),fdinfo(fd)->fdflags);
+ }
+ else
+ {
+ DPRINT1("not valid fd %i, g_fdend %i\n",fd,g_fdend);
+ }
}
Show replies by date