[c++,03/12] ctf_xfer_partial: Return TARGET_XFER_E_IO instead of -1 on error

Message ID 1445831204-16588-3-git-send-email-simon.marchi@polymtl.ca
State New, archived
Headers

Commit Message

Simon Marchi Oct. 26, 2015, 3:46 a.m. UTC
  Use the enum value instead of the corresponding int value.

gdb/ChangeLog:

	* ctf.c (ctf_xfer_partial): Return TARGET_XFER_E_IO instead of
	-1 on error.
---
 gdb/ctf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
  

Comments

Simon Marchi Oct. 27, 2015, 2:02 a.m. UTC | #1
I pushed this one, I consider it obvious enough.
  

Patch

diff --git a/gdb/ctf.c b/gdb/ctf.c
index cb0d707..b8d7285 100644
--- a/gdb/ctf.c
+++ b/gdb/ctf.c
@@ -1279,7 +1279,7 @@  ctf_xfer_partial (struct target_ops *ops, enum target_object object,
 {
   /* We're only doing regular memory for now.  */
   if (object != TARGET_OBJECT_MEMORY)
-    return -1;
+    return TARGET_XFER_E_IO;
 
   if (readbuf == NULL)
     error (_("ctf_xfer_partial: trace file is read-only"));