Staging
v0.5.1
Revision 7d09fbe4ab7f080a8f8f5dcef7e0f3edf5e26019 authored by Serge E. Hallyn on 18 April 2006, 13:11:06 UTC, committed by Junio C Hamano on 25 April 2006, 06:07:54 UTC
The set_reuse_addr() error case was the only error case in
socklist() where we returned rather than continued.  Not sure
why.  Either we must free the socklist, or continue.  This patch
continues on error.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Junio C Hamano <junkio@cox.net>
(cherry picked from 0032d548db56eac9ea09b4ba05843365f6325b85 commit)
1 parent 1ab661d
Raw File
test-date.c
#include <stdio.h>
#include <time.h>

#include "cache.h"

int main(int argc, char **argv)
{
	int i;

	for (i = 1; i < argc; i++) {
		char result[100];
		time_t t;

		memcpy(result, "bad", 4);
		parse_date(argv[i], result, sizeof(result));
		t = strtoul(result, NULL, 0);
		printf("%s -> %s -> %s", argv[i], result, ctime(&t));

		t = approxidate(argv[i]);
		printf("%s -> %s\n", argv[i], ctime(&t));
	}
	return 0;
}
back to top