[Darshan-commits] [Git][darshan/darshan][dev-stdio] cleanup sizeof calls

Philip Carns xgitlab at cels.anl.gov
Fri Jun 24 12:15:42 CDT 2016


Philip Carns pushed to branch dev-stdio at darshan / darshan


Commits:
8bb4890f by Phil Carns at 2016-06-24T13:15:28-04:00
cleanup sizeof calls

- - - - -


1 changed file:

- darshan-runtime/lib/darshan-stdio.c


Changes:

=====================================
darshan-runtime/lib/darshan-stdio.c
=====================================
--- a/darshan-runtime/lib/darshan-stdio.c
+++ b/darshan-runtime/lib/darshan-stdio.c
@@ -190,7 +190,7 @@ static void stdio_cleanup_runtime();
         break; \
     } \
     rec_id = darshan_core_gen_record_id(newpath); \
-    rec_ref = darshan_lookup_record_ref(stdio_runtime->rec_id_hash, &rec_id, sizeof(darshan_record_id)); \
+    rec_ref = darshan_lookup_record_ref(stdio_runtime->rec_id_hash, &rec_id, sizeof(rec_id)); \
     if(!rec_ref) rec_ref = stdio_track_new_file_record(rec_id, newpath); \
     if(!rec_ref) { \
         if(newpath != (char*)__path) free(newpath); \
@@ -211,7 +211,7 @@ static void stdio_cleanup_runtime();
 #define STDIO_RECORD_READ(__fp, __bytes,  __tm1, __tm2) do{ \
     struct stdio_file_record_ref* rec_ref; \
     int64_t this_offset; \
-    rec_ref = darshan_lookup_record_ref(stdio_runtime->stream_hash, &(__fp), sizeof(int)); \
+    rec_ref = darshan_lookup_record_ref(stdio_runtime->stream_hash, &(__fp), sizeof(__fp)); \
     if(!rec_ref) break; \
     this_offset = rec_ref->offset; \
     rec_ref->offset = this_offset + __bytes; \



View it on GitLab: https://xgitlab.cels.anl.gov/darshan/darshan/commit/8bb4890ff50e603d74ea08a531326b3dc6a39680
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/darshan-commits/attachments/20160624/580901bf/attachment-0001.html>


More information about the Darshan-commits mailing list