char mon[16]; // Abbreviated month name
int day, year; // Day of month and year
int hour, min, sec; // Time
- int days; // Number of days since 1970
+ long days; // Number of days since 1970
static const int normal_days[] = // Days to a month, normal years
{ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 };
static const int leap_days[] = // Days to a month, leap years
else
days = normal_days[i] + day - 1;
- DEBUG_printf("4httpGetDateTime: days=%d", days);
+ DEBUG_printf("4httpGetDateTime: days=%ld", days);
days += (year - 1970) * 365 + // 365 days per year (normally)
((year - 1) / 4 - 492) - // + leap days
((year - 1) / 100 - 19) + // - 100 year days
((year - 1) / 400 - 4); // + 400 year days
- DEBUG_printf("4httpGetDateTime: days=%d\n", days);
+ DEBUG_printf("4httpGetDateTime: days=%ld\n", days);
return (days * 86400 + hour * 3600 + min * 60 + sec);
}
if (!path)
path = http_default_path(defpath, sizeof(defpath));
- if (!path || !common_name)
+ if (!path || !common_name || !*common_name)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(EINVAL), 0);
goto done;
if (!path)
path = http_default_path(defpath, sizeof(defpath));
- if (!path || !common_name)
+ if (!path || !common_name || !*common_name)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(EINVAL), 0);
goto done;
if (!path)
path = http_default_path(defpath, sizeof(defpath));
- if (!path || !common_name)
+ if (!path || !common_name || !*common_name)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(EINVAL), 0);
return (false);
if (!path)
path = http_default_path(temp, sizeof(temp));
- if (!path || !common_name)
+ if (!path || !common_name || !*common_name)
{
_cupsSetError(IPP_STATUS_ERROR_INTERNAL, strerror(EINVAL), 0);
return (false);