HomeClusterLabs Projects

notifyd: Fix warning produced by 32-bit compiler

Description

notifyd: Fix warning produced by 32-bit compiler

time_t is platform dependent real type which is usually long int on
64-bit platform, but only int on 32-bit platform and printing it with
%ld generated warning.

Solution seems to be ether retype time_t to long int or use functions
which works with time_t. Later option is used in this patch, which uses
localtime and strftime to print time_t value.

Also code is refactored to remove duplicate calls and add _cs_snmp
prefix to prevent snmp_ prefix collision.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Christine Caulfield <ccaulfie@redhat.com>

Details

Provenance
jfriesseAuthored on Jul 4 2019, 8:36 AM
Parents
rCd7f5478b3223: cfgtool: Remove unused code
Branches
Unknown
Tags
Unknown

Event Timeline