summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@cvs.openbsd.org>2013-06-21 05:43:11 +0000
committerDamien Miller <djm@cvs.openbsd.org>2013-06-21 05:43:11 +0000
commitd068504c991345d031770117110cb6f95ded2a36 (patch)
treefad94e1185aec5e9000b2003270736611e491ffb
parent977fab9f780c7b4615882b8d21c916ad68402731 (diff)
make this -Wsign-compare clean after time_t conversion
-rw-r--r--usr.bin/ssh/scp.c6
1 files changed, 3 insertions, 3 deletions
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);