We use size_t for width. This patch makes it consistent for
years_width too.
Signed-off-by: Karel Zak <kzak@redhat.com>
static void yearly(const struct cal_control *ctl)
{
char out[FMT_ST_CHARS];
- int year_width;
+ size_t year_width;
- year_width = ctl->months_in_row * (ctl->week_width) +
- (ctl->months_in_row - 1) * ctl->gutter_width;
+ year_width = (size_t) ctl->months_in_row * ctl->week_width
+ + ((size_t) ctl->months_in_row - 1) * ctl->gutter_width;
if (ctl->header_year) {
snprintf(out, sizeof(out), "%04d", ctl->req.year);