FILE *f = NULL;
char *path, *home, date[64], cctim[64];
long pos = 0;
- time_t ctim = 0, cnow;
+ time_t ctim = -1, cnow;
int i, got = 0, ret = 0;
unsigned int hlen;
struct info in = {0};
cnow = time(NULL);
/* If we got a cache time, see if it's young enough to use directly */
- if (got && ctim)
+ if (age && ctim > 0)
{
ctim = cnow - ctim;
ctim /= 3600 * 24; /* seconds to days */
case 'X':
{
int num = atoi(optarg);
- if (num < 1)
+ if (num < 0)
{
- Log(LOGERROR, "SWF Age must be at least 1, ignoring\n");
+ Log(LOGERROR, "SWF Age must be non-negative, ignoring\n");
}
else
{
case 'X':
{
int num = atoi(arg);
- if (num <= 0)
+ if (num < 0)
{
- Log(LOGERROR, "SWF Age must be at least 1, ignoring\n");
+ Log(LOGERROR, "SWF Age must be non-negative, ignoring\n");
}
else
{