[ET Trac] [Einstein Toolkit] #1986: this compared to NULL in CarpetLib

Einstein Toolkit trac-noreply at einsteintoolkit.org
Wed Nov 23 12:34:19 CST 2016


#1986: this compared to NULL in CarpetLib
---------------------+------------------------------------------------------
  Reporter:  rhaas   |       Owner:  eschnett           
      Type:  defect  |      Status:  review             
  Priority:  minor   |   Milestone:                     
 Component:  Carpet  |     Version:  development version
Resolution:          |    Keywords:                     
---------------------+------------------------------------------------------
Changes (by eschnett):

  * status:  new => review


Comment:

 I have a two-line correction for this that I am currently testing:
 {{{
 diff --git a/CarpetLib/src/gdata.cc b/CarpetLib/src/gdata.cc
 index 3d448fd..1ff8cc6 100644
 --- a/CarpetLib/src/gdata.cc
 +++ b/CarpetLib/src/gdata.cc
 @@ -183,7 +183,7 @@ void gdata::copy_from(comm_state &state, gdata const
 *const src,
    vector<gdata const *> const srcs(1, src);
    CCTK_REAL const time = 0.0;
    vector<CCTK_REAL> const times(1, time);
 -  int const order_space = (this ? cent : src->cent) == vertex_centered ?
 1 : 0;
 +  int const order_space = cent == vertex_centered ? 1 : 0;
    int const order_time = 0;
    transfer_from(state, srcs, times, dstbox, srcbox, slabinfo, dstproc,
 srcproc,
                  time, order_space, order_time);
 @@ -221,7 +221,7 @@ void gdata::transfer_from(comm_state &state,
 vector<gdata const *> const &srcs,
        assert(srcs.AT(t)->has_storage());
      }
    }
 -  gdata const *const src = is_src ? srcs.AT(0) : NULL;
 +  gdata const *const src = srcs.AT(0);

    operator_type const my_transport_operator =
        is_dst ? transport_operator : src->transport_operator;
 }}}

-- 
Ticket URL: <https://trac.einsteintoolkit.org/ticket/1986#comment:1>
Einstein Toolkit <http://einsteintoolkit.org>
The Einstein Toolkit


More information about the Trac mailing list