From: Nicholas Nethercote Date: Thu, 19 Apr 2007 23:35:42 +0000 (+0000) Subject: It's generally a good idea to set call-by-reference arguments, especially X-Git-Tag: svn/VALGRIND_3_3_0~284 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2005fbaa40b7b6223775722f5985bdecf974f9db;p=thirdparty%2Fvalgrind.git It's generally a good idea to set call-by-reference arguments, especially when the function comments says that they always are set. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6707 --- diff --git a/coregrind/m_debuginfo/debuginfo.c b/coregrind/m_debuginfo/debuginfo.c index a9cc654175..e7fad3d3c3 100644 --- a/coregrind/m_debuginfo/debuginfo.c +++ b/coregrind/m_debuginfo/debuginfo.c @@ -740,8 +740,11 @@ Bool VG_(get_filename_linenum) ( Addr a, (dirname != NULL && dirname_available != NULL) ); search_all_loctabs ( a, &si, &locno ); - if (si == NULL) + if (si == NULL) { + if (dirname_available) *dirname_available = False; return False; + } + VG_(strncpy_safely)(filename, si->loctab[locno].filename, n_filename); *lineno = si->loctab[locno].lineno;