diff options
author | Ed Maste <emaste@FreeBSD.org> | 2016-02-10 19:39:36 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2016-02-10 19:39:36 +0000 |
commit | 888a18208d70e0395f1ba2a425a272996246174e (patch) | |
tree | 3de9500b684e6cb0b1066dfbf0133793e385df71 /libdwarf/dwarf_str.c | |
parent | 768a24a304ee84c17865b4348beacb61aa47af1b (diff) |
Diffstat (limited to 'libdwarf/dwarf_str.c')
-rw-r--r-- | libdwarf/dwarf_str.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libdwarf/dwarf_str.c b/libdwarf/dwarf_str.c index 71a7f75b28429..c402f21819738 100644 --- a/libdwarf/dwarf_str.c +++ b/libdwarf/dwarf_str.c @@ -26,7 +26,7 @@ #include "_libdwarf.h" -ELFTC_VCSID("$Id: dwarf_str.c 2075 2011-10-27 03:47:28Z jkoshy $"); +ELFTC_VCSID("$Id: dwarf_str.c 3295 2016-01-08 22:08:10Z jkoshy $"); int dwarf_get_str(Dwarf_Debug dbg, Dwarf_Off offset, char **string, @@ -34,7 +34,7 @@ dwarf_get_str(Dwarf_Debug dbg, Dwarf_Off offset, char **string, { Dwarf_Section *ds; - if (dbg == NULL || offset < 0 || string == NULL || ret_strlen == NULL) { + if (dbg == NULL || string == NULL || ret_strlen == NULL) { DWARF_SET_ERROR(dbg, error, DW_DLE_ARGUMENT); return (DW_DLV_ERROR); } @@ -45,12 +45,12 @@ dwarf_get_str(Dwarf_Debug dbg, Dwarf_Off offset, char **string, return (DW_DLV_NO_ENTRY); } - if ((Dwarf_Unsigned) offset > ds->ds_size) { + if (offset > ds->ds_size) { DWARF_SET_ERROR(dbg, error, DW_DLE_ARGUMENT); return (DW_DLV_ERROR); } - if ((Dwarf_Unsigned) offset == ds->ds_size) { + if (offset == ds->ds_size) { DWARF_SET_ERROR(dbg, error, DW_DLE_NO_ENTRY); return (DW_DLV_NO_ENTRY); } |