From d068504c991345d031770117110cb6f95ded2a36 Mon Sep 17 00:00:00 2001 From: Damien Miller Date: Fri, 21 Jun 2013 05:43:11 +0000 Subject: make this -Wsign-compare clean after time_t conversion --- usr.bin/ssh/scp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.bin') diff --git a/usr.bin/ssh/scp.c b/usr.bin/ssh/scp.c index f36286b3fe7..ad08bc0ca1d 100644 --- a/usr.bin/ssh/scp.c +++ b/usr.bin/ssh/scp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: scp.c,v 1.176 2013/06/17 04:48:42 guenther Exp $ */ +/* $OpenBSD: scp.c,v 1.177 2013/06/21 05:43:10 djm Exp $ */ /* * scp - secure remote copy. This is basically patched BSD rcp which * uses ssh to do the data transfer (instead of using rcmd). @@ -955,7 +955,7 @@ sink(int argc, char **argv) ull = strtoull(cp, &cp, 10); if (!cp || *cp++ != ' ') SCREWUP("mtime.sec not delimited"); - if ((time_t)ull < 0 || (time_t)ull != ull) + if ((time_t)ull < 0 || ull > LLONG_MAX) setimes = 0; /* out of range */ mtime.tv_sec = ull; mtime.tv_usec = strtol(cp, &cp, 10); @@ -967,7 +967,7 @@ sink(int argc, char **argv) ull = strtoull(cp, &cp, 10); if (!cp || *cp++ != ' ') SCREWUP("atime.sec not delimited"); - if ((time_t)ull < 0 || (time_t)ull != ull) + if ((time_t)ull < 0 || ull > LLONG_MAX) setimes = 0; /* out of range */ atime.tv_sec = ull; atime.tv_usec = strtol(cp, &cp, 10); -- cgit v1.2.3