Skip to content
  • Johannes Berg's avatar
    mac80211: use offsetofend() · 4c121fd6
    Johannes Berg authored
    
    
    This was created using the following spatch:
        @find@
        type S;
        expression M, M2;
        position p;
        @@
        offsetof(S, M) + sizeof(M2)@p
    
        @script:python@
        m << find.M;
        m2 << find.M2;
        @@
        if not m2.endswith('-> ' + m):
                cocci.include_match(False)
    
        @change@
        type find.S;
        expression find.M, find.M2;
        position find.p;
        @@
        -offsetof(S, M) + sizeof(M2)@p
        +offsetofend(S, M)
    
    Signed-off-by: default avatarJohannes Berg <johannes.berg@intel.com>
    4c121fd6