Close bin/937 - handle negative timestamps
This commit is contained in:
parent
329ca3c57c
commit
e68ac78c73
@ -30,7 +30,7 @@
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* $Id: rcp.c,v 1.4 1995/05/30 00:07:06 rgrimes Exp $
|
||||
* $Id: rcp.c,v 1.5 1995/09/10 14:57:48 markm Exp $
|
||||
*/
|
||||
|
||||
#ifndef lint
|
||||
@ -592,22 +592,21 @@ sink(argc, argv)
|
||||
if (ch == '\n')
|
||||
*--cp = 0;
|
||||
|
||||
#define getnum(t) (t) = 0; while (isdigit(*cp)) (t) = (t) * 10 + (*cp++ - '0');
|
||||
cp = buf;
|
||||
if (*cp == 'T') {
|
||||
setimes++;
|
||||
cp++;
|
||||
getnum(mtime.tv_sec);
|
||||
if (*cp++ != ' ')
|
||||
mtime.tv_sec = strtol(cp, &cp, 10);
|
||||
if (!cp || *cp++ != ' ')
|
||||
SCREWUP("mtime.sec not delimited");
|
||||
getnum(mtime.tv_usec);
|
||||
if (*cp++ != ' ')
|
||||
mtime.tv_usec = strtol(cp, &cp, 10);
|
||||
if (!cp || *cp++ != ' ')
|
||||
SCREWUP("mtime.usec not delimited");
|
||||
getnum(atime.tv_sec);
|
||||
if (*cp++ != ' ')
|
||||
atime.tv_sec = strtol(cp, &cp, 10);
|
||||
if (!cp || *cp++ != ' ')
|
||||
SCREWUP("atime.sec not delimited");
|
||||
getnum(atime.tv_usec);
|
||||
if (*cp++ != '\0')
|
||||
atime.tv_usec = strtol(cp, &cp, 10);
|
||||
if (!cp || *cp++ != '\0')
|
||||
SCREWUP("atime.usec not delimited");
|
||||
(void)write(rem, "", 1);
|
||||
continue;
|
||||
|
Loading…
Reference in New Issue
Block a user