diff options
| author | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
|---|---|---|
| committer | cvs2svn <cvs2svn@FreeBSD.org> | 1999-01-21 00:55:32 +0000 | 
| commit | 76b5366091f76c9bc73570149ef5055648fc2c39 (patch) | |
| tree | 590d020e0f2a5bea6e09d66d951a674443b21d67 /usr.sbin/tcpdump | |
| parent | 4b4d01da6f07f7754ff6a6e4f5223e9f0984d1a6 (diff) | |
Diffstat (limited to 'usr.sbin/tcpdump')
| -rw-r--r-- | usr.sbin/tcpdump/tcpslice/tcpslice.c | 12 | 
1 files changed, 3 insertions, 9 deletions
| diff --git a/usr.sbin/tcpdump/tcpslice/tcpslice.c b/usr.sbin/tcpdump/tcpslice/tcpslice.c index a1ff54e369497..904d9b7f2ded0 100644 --- a/usr.sbin/tcpdump/tcpslice/tcpslice.c +++ b/usr.sbin/tcpdump/tcpslice/tcpslice.c @@ -27,7 +27,7 @@ static const char copyright[] =  #ifndef lint  static const char rcsid[] = -	"$Id: tcpslice.c,v 1.7 1999/01/15 07:37:00 imp Exp $"; +	"$Id$";  #endif /* not lint */  /* @@ -356,12 +356,8 @@ fill_tm(char *time_string, int is_delta, struct tm *t, time_t *usecs_addr)  		switch (format_ch) {  			case 'y': -				if ( val >= 1900 ) +				if ( val > 1900 )  					val -= 1900; -				else if (val < 100 && !is_delta) { -					if (val < 69)	/* Same hack as date */ -						val += 100; -				}  				SET_VAL(t->tm_year, val);  				break; @@ -567,7 +563,7 @@ timestamp_to_string(struct timeval *timestamp)  	switch ( timestamp_style )  	    {  	    case TIMESTAMP_RAW: -		sprintf(buf, "%lu.%06lu", timestamp->tv_sec, timestamp->tv_usec); +		sprintf(buf, "%ld.%ld", timestamp->tv_sec, timestamp->tv_usec);  		break;  	    case TIMESTAMP_READABLE: @@ -578,8 +574,6 @@ timestamp_to_string(struct timeval *timestamp)  	    case TIMESTAMP_PARSEABLE:  		t = localtime((time_t *) ×tamp->tv_sec); -		if (t->tm_year >= 100) -			t->tm_year += 1900;  		sprintf( buf, "%02dy%02dm%02dd%02dh%02dm%02ds%06ldu",  			t->tm_year, t->tm_mon + 1, t->tm_mday, t->tm_hour,  			t->tm_min, t->tm_sec, timestamp->tv_usec ); | 
