• Gerrit Renker's avatar
    [DCCP]: Debug timeval operations · 0f9e5b57
    Gerrit Renker authored
    Problem:
    
     Most target types in the CCID3 code are u32, so subtle conversion errors
     can occur if signed time calculations yield negative results: the original
     values are lost in the conversion to unsigned, calculation errors go undetected.
    
     This patch therefore
       * sets all critical time types from unsigned to suseconds_t
       * avoids comparison between signed/unsigned via type-casting
       * provides ample warning messages in case time calculations are negative
    
     These warning messages can be removed at a later stage when the code
     has undergone more testing.
    Signed-off-by: default avatarGerrit Renker <gerrit@erg.abdn.ac.uk>
    Acked-by: default avatarIan McDonald <ian.mcdonald@jandi.co.nz>
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@mandriva.com>
    0f9e5b57
dccp.h 13.6 KB