sim: fix func call style (space before paren)
[deliverable/binutils-gdb.git] / sim / common / syscall.c
index a3e7560bf484977a4446c8b838fa8cb5c88effb3..28816c02b55836d4491e9eb6bb899b64eeb59587 100644 (file)
@@ -1,5 +1,6 @@
 /* Remote target system call support.
-   Copyright 1997, 1998, 2002, 2004, 2007 Free Software Foundation, Inc.
+   Copyright 1997, 1998, 2002, 2004, 2007, 2008, 2009, 2010, 2011
+   Free Software Foundation, Inc.
    Contributed by Cygnus Solutions.
 
    This file is part of GDB.
@@ -92,7 +93,7 @@ get_string (cb, sc, buf, buflen, addr)
         path name along with the syscall request, and cache the file
         name somewhere (or otherwise tweak this as desired).  */
       unsigned int count = (*sc->read_mem) (cb, sc, addr, p, 1);
-                                   
+
       if (count != 1)
        return EINVAL;
       if (*p == 0)
@@ -344,12 +345,12 @@ cb_syscall (cb, sc)
                errcode = EINVAL;
                goto FinishSyscall;
              }
-           if (fd == 1)
+           if (cb_is_stdout (cb, fd))
              {
                result = (int) (*cb->write_stdout) (cb, buf, bytes_read);
                (*cb->flush_stdout) (cb);
              }
-           else if (fd == 2)
+           else if (cb_is_stderr (cb, fd))
              {
                result = (int) (*cb->write_stderr) (cb, buf, bytes_read);
                (*cb->flush_stderr) (cb);
This page took 0.024034 seconds and 4 git commands to generate.