<html lang='en'>
<head>
<meta content='text/html; charset=utf-8' http-equiv='Content-Type'>
<title>
GitLab
</title>
</meta>
</head>
<style>
  img {
    max-width: 100%;
    height: auto;
  }
  p.details {
    font-style:italic;
    color:#777
  }
  .footer p {
    font-size:small;
    color:#777
  }
  pre.commit-message {
    white-space: pre-wrap;
  }
  .file-stats a {
    text-decoration: none;
  }
  .file-stats .new-file {
    color: #090;
  }
  .file-stats .deleted-file {
    color: #B00;
  }
</style>
<body>
<div class='content'>
<h3>Shane Snyder pushed to branch dev-modular at <a href="https://xgitlab.cels.anl.gov/darshan/darshan">darshan / darshan</a></h3>
<h4>
Commits:
</h4>
<ul>
<li>
<strong><a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/b770409e461781a9723c194b0c76e27620eefa79">b770409e</a></strong>
<div>
<span>by Shane Snyder</span>
<i>at 2016-01-13T13:29:12Z</i>
</div>
<pre class='commit-message'>minor bug fix in darshan-diff tool</pre>
</li>
</ul>
<h4>1 changed file:</h4>
<ul>
<li class='file-stats'>
<a href='#diff-0'>
darshan-util/darshan-diff.c
</a>
</li>
</ul>
<h4>Changes:</h4>
<li id='diff-0'>
<a href='https://xgitlab.cels.anl.gov/darshan/darshan/commit/b770409e461781a9723c194b0c76e27620eefa79#diff-0'>
<strong>
darshan-util/darshan-diff.c
</strong>
</a>
<hr>
<pre class="highlight"><code><span style="color: #000000;background-color: #ffdddd">--- a/darshan-util/darshan-diff.c
</span><span style="color: #000000;background-color: #ddffdd">+++ b/darshan-util/darshan-diff.c
</span><span style="color: #aaaaaa">@@ -408,11 +408,24 @@ static int darshan_build_global_record_hash(
</span>                 mod_rec->rank = base_rec->rank;
 
                 HASH_FIND(hlink, *rec_hash, &tmp_rec_id, sizeof(darshan_record_id), file_rec);
<span style="color: #000000;background-color: #ffdddd">-                if(file_rec)
</span><span style="color: #000000;background-color: #ddffdd">+                if(!file_rec)
</span>                 {
<span style="color: #000000;background-color: #ffdddd">-                    /* the global record already exists, so we need to just add the
-                     * module record to the linked list of records for this module
</span><span style="color: #000000;background-color: #ddffdd">+                    /* there is no entry in the global hash table of darshan records
+                     * for this log file, so create one and add it.
</span>                      */
<span style="color: #000000;background-color: #ddffdd">+                    file_rec = malloc(sizeof(struct darshan_file_record_ref));
+                    assert(file_rec);
+
+                    memset(file_rec, 0, sizeof(struct darshan_file_record_ref));
+                    file_rec->rec_id = tmp_rec_id;
+                    HASH_ADD(hlink, *rec_hash, rec_id, sizeof(darshan_record_id), file_rec);
+
+                }
+
+                /* add new record into the linked list of this module's records */
+                if(file_rec->mod_recs[i])
+                {
+                    /* there is already an initialized linked list for this module */
</span> 
                     /* we start at the end of the list and work backwards to insert this
                      * record (the list is sorted according to increasing ranks, and in
<span style="color: #aaaaaa">@@ -449,17 +462,9 @@ static int darshan_build_global_record_hash(
</span>                 }
                 else
                 {
<span style="color: #000000;background-color: #ffdddd">-                    /* there is no entry in the global hash table of darshan records
-                     * for this log file, so create one and add it.
</span><span style="color: #000000;background-color: #ddffdd">+                    /* there are currently no records for this module, so just
+                     * initialize a new linked list
</span>                      */
<span style="color: #000000;background-color: #ffdddd">-                    file_rec = malloc(sizeof(struct darshan_file_record_ref));
-                    assert(file_rec);
</span>-
<span style="color: #000000;background-color: #ffdddd">-                    memset(file_rec, 0, sizeof(struct darshan_file_record_ref));
-                    file_rec->rec_id = tmp_rec_id;
-                    HASH_ADD(hlink, *rec_hash, rec_id, sizeof(darshan_record_id), file_rec);
</span>-
<span style="color: #000000;background-color: #ffdddd">-                    /* also, add this record to this module's linked list of records */
</span>                     mod_rec->prev = mod_rec->next = mod_rec;
                     file_rec->mod_recs[i] = mod_rec;
                 }
</code></pre>

<br>
</li>

</div>
<div class='footer' style='margin-top: 10px;'>
<p>

<br>
<a href="https://xgitlab.cels.anl.gov/darshan/darshan/commit/b770409e461781a9723c194b0c76e27620eefa79">View it on GitLab</a>
<script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","action":{"@type":"ViewAction","name":"View Commit","url":"https://xgitlab.cels.anl.gov/darshan/darshan/commit/b770409e461781a9723c194b0c76e27620eefa79"}}</script>
</p>
</div>
</body>
</html>