]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
It's generally a good idea to set call-by-reference arguments, especially
authorNicholas Nethercote <njn@valgrind.org>
Thu, 19 Apr 2007 23:35:42 +0000 (23:35 +0000)
committerNicholas Nethercote <njn@valgrind.org>
Thu, 19 Apr 2007 23:35:42 +0000 (23:35 +0000)
when the function comments says that they always are set.

git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6707

coregrind/m_debuginfo/debuginfo.c

index a9cc654175cab706b02df08f5b29baf60a1b5966..e7fad3d3c39682dc26f288e4b92f8a3fb62f0acc 100644 (file)
@@ -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;