diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2007-02-27 22:00:39 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2007-02-27 22:00:39 +0000 |
commit | a1f42e84b8ba21b9cbdc58b9a3a5427137881af3 (patch) | |
tree | 0dbd43207c2a2c8c5ce02508bd857fb1198dbd80 /gdb/varobj.c | |
parent | e0b75a463c83dd8ae474e216ca8a77df85f0a1b4 (diff) | |
download | gdb-a1f42e84b8ba21b9cbdc58b9a3a5427137881af3.zip gdb-a1f42e84b8ba21b9cbdc58b9a3a5427137881af3.tar.gz gdb-a1f42e84b8ba21b9cbdc58b9a3a5427137881af3.tar.bz2 |
(varobj_update): Remove unused local. Use gdb_assert
to check changelist is non-NULL. Call error if the frontend tries
to update a non-root variable.
Diffstat (limited to 'gdb/varobj.c')
-rw-r--r-- | gdb/varobj.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gdb/varobj.c b/gdb/varobj.c index a2fd1c8..f86082e 100644 --- a/gdb/varobj.c +++ b/gdb/varobj.c @@ -1037,7 +1037,6 @@ int varobj_update (struct varobj **varp, struct varobj ***changelist) { int changed = 0; - int error = 0; int type_changed; int i; int vleft; @@ -1051,13 +1050,10 @@ varobj_update (struct varobj **varp, struct varobj ***changelist) struct frame_info *fi; /* sanity check: have we been passed a pointer? */ - if (changelist == NULL) - return WRONG_PARAM; + gdb_assert (changelist); - /* Only root variables can be updated... */ if (!is_root_p (*varp)) - /* Not a root var. */ - return WRONG_PARAM; + error (_("Only root variables can be updated")); if (!(*varp)->root->is_valid) return INVALID; |