Date: Sat, 12 Jan 2008 05:03:00 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 133092 for review Message-ID: <200801120503.m0C5306c007386@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=133092 Change 133092 by jb@jb_freebsd1 on 2008/01/12 05:02:21 Enforce the return values when lookup fails. Affected files ... .. //depot/projects/dtrace/src/lib/libdwarf/dwarf_attrval.c#3 edit Differences ... ==== //depot/projects/dtrace/src/lib/libdwarf/dwarf_attrval.c#3 (text+ko) ==== @@ -80,6 +80,8 @@ return DWARF_E_ARGUMENT; } + *valp = 0; + if ((av = dwarf_attrval_find(die, attr)) == NULL) { DWARF_SET_ERROR(err, DWARF_E_NO_ENTRY); ret = DWARF_E_NO_ENTRY; @@ -114,8 +116,9 @@ return DWARF_E_ARGUMENT; } + *strp = NULL; + if ((av = dwarf_attrval_find(die, attr)) == NULL) { - *strp = NULL; DWARF_SET_ERROR(err, DWARF_E_NO_ENTRY); ret = DWARF_E_NO_ENTRY; } else { @@ -152,6 +155,8 @@ return DWARF_E_ARGUMENT; } + *valp = 0; + if ((av = dwarf_attrval_find(die, attr)) == NULL) { DWARF_SET_ERROR(err, DWARF_E_NO_ENTRY); ret = DWARF_E_NO_ENTRY; @@ -187,6 +192,8 @@ return DWARF_E_ARGUMENT; } + *valp = 0; + if ((av = dwarf_attrval_find(die, attr)) == NULL) { DWARF_SET_ERROR(err, DWARF_E_NO_ENTRY); ret = DWARF_E_NO_ENTRY;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200801120503.m0C5306c007386>