trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: TRAFODION-1885 : online expansio...
Date Wed, 16 Mar 2016 19:26:52 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/385#discussion_r56399136
  
    --- Diff: core/sqf/monitor/linux/replicate.cxx ---
    @@ -68,7 +68,7 @@ void CReplObj::validateObj()
     // Determine the maximum size of a replication object (excluding CReplEvent)
     int CReplObj::calcAllocSize()
     {
    -    return  max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(sizeof(CReplSoftNodeUp),
    +    return  max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(max(sizeof(CReplSoftNodeUp),
    --- End diff --
    
    The max'es are fun. Another way to do this is to create a union of all these objects,
and take the sizeof the union. The C compiler then takes the max.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message