Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE
pacemaker.8750
pacemaker-snprintf-correct-signedness-format-sp...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File pacemaker-snprintf-correct-signedness-format-specifiers.patch of Package pacemaker.8750
commit 5d39f5b85f1ad8247fb14ef9c60684800b98bab3 Author: Jan Pokorný <jpokorny@redhat.com> Date: Wed Feb 15 13:07:35 2017 +0100 Fix: snprintf: use correct signedness in print format specifiers Index: pacemaker-1.1.16+20170320.77ea74d/lib/common/iso8601.c =================================================================== --- pacemaker-1.1.16+20170320.77ea74d.orig/lib/common/iso8601.c +++ pacemaker-1.1.16+20170320.77ea74d/lib/common/iso8601.c @@ -447,13 +447,13 @@ crm_time_as_string(crm_time_t * date_tim if(dt->seconds) { offset += snprintf(date_s+offset, max-offset, "%d seconds ( ", dt->seconds); if(h) { - offset += snprintf(date_s+offset, max-offset, "%d hour%s ", h, h>1?"s":""); + offset += snprintf(date_s+offset, max-offset, "%u hour%s ", h, h>1?"s":""); } if(m) { - offset += snprintf(date_s+offset, max-offset, "%d minute%s ", m, m>1?"s":""); + offset += snprintf(date_s+offset, max-offset, "%u minute%s ", m, m>1?"s":""); } if(s) { - offset += snprintf(date_s+offset, max-offset, "%d second%s ", s, s>1?"s":""); + offset += snprintf(date_s+offset, max-offset, "%u second%s ", s, s>1?"s":""); } offset += snprintf(date_s+offset, max-offset, ")"); } @@ -482,7 +482,7 @@ crm_time_as_string(crm_time_t * date_tim uint y, w, d; if (crm_time_get_isoweek(dt, &y, &w, &d)) { - snprintf(date_s, 32, "%d-W%.2d-%d", y, w, d); + snprintf(date_s, 32, "%u-W%.2u-%u", y, w, d); } } else if (flags & crm_time_ordinal) { @@ -490,7 +490,7 @@ crm_time_as_string(crm_time_t * date_tim uint y, d; if (crm_time_get_ordinal(dt, &y, &d)) { - snprintf(date_s, 32, "%d-%.3d", y, d); + snprintf(date_s, 32, "%u-%.3u", y, d); } } else { @@ -498,7 +498,7 @@ crm_time_as_string(crm_time_t * date_tim uint y, m, d; if (crm_time_get_gregorian(dt, &y, &m, &d)) { - snprintf(date_s, 32, "%.4d-%.2d-%.2d", y, m, d); + snprintf(date_s, 32, "%.4u-%.2u-%.2u", y, m, d); } } } @@ -512,7 +512,7 @@ crm_time_as_string(crm_time_t * date_tim } if (crm_time_get_timeofday(dt, &h, &m, &s)) { - snprintf(time_s, 32, "%.2d:%.2d:%.2d", h, m, s); + snprintf(time_s, 32, "%.2u:%.2u:%.2u", h, m, s); } if (dt->offset != 0) { @@ -525,7 +525,7 @@ crm_time_as_string(crm_time_t * date_tim snprintf(offset_s, 32, "Z"); } else { - snprintf(offset_s, 32, " %c%.2d:%.2d", dt->offset < 0 ? '-' : '+', h, m); + snprintf(offset_s, 32, " %c%.2u:%.2u", dt->offset < 0 ? '-' : '+', h, m); } }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor