[stunnel-users] [PATCH] Fix int/size_t mismatch in stack_info ()
Miloslav Trmac
mitr at redhat.com
Tue Jul 12 11:56:33 CEST 2005
Hello,
stack_info () in stunnel-4.11 uses "%d" to print values of type size_t.
The attached patch fixes this.
Mirek
-------------- next part --------------
--- stunnel-4.11/src/sthreads.c.printf 2005-07-12 11:43:42.000000000 +0200
+++ stunnel-4.11/src/sthreads.c 2005-07-12 11:46:33.000000000 +0200
@@ -337,10 +337,10 @@
s_log(LOG_NOTICE,
"stack_info: size=%d, current=%d (%d%%), maximum=%d (%d%%)",
STACK_SIZE,
- (VERIFY_AREA-num)*sizeof(u32),
- (VERIFY_AREA-num)*sizeof(u32)*100/STACK_SIZE,
- (VERIFY_AREA-min_num)*sizeof(u32),
- (VERIFY_AREA-min_num)*sizeof(u32)*100/STACK_SIZE);
+ (int)((VERIFY_AREA-num)*sizeof(u32)),
+ (int)((VERIFY_AREA-num)*sizeof(u32)*100/STACK_SIZE),
+ (int)((VERIFY_AREA-min_num)*sizeof(u32)),
+ (int)((VERIFY_AREA-min_num)*sizeof(u32)*100/STACK_SIZE));
}
}
More information about the stunnel-users
mailing list