summaryrefslogtreecommitdiff
path: root/usr.bin/at
diff options
context:
space:
mode:
authorcheloha <cheloha@cvs.openbsd.org>2019-11-29 03:12:36 +0000
committercheloha <cheloha@cvs.openbsd.org>2019-11-29 03:12:36 +0000
commit81f4a649444b1bde4f10640d2957b7f920c6ab28 (patch)
treeeb9e16c9bc36d1834e108b179c2ce615841c02eb /usr.bin/at
parentf00c31b68494043a1ce343cceaa154496e9adfa4 (diff)
at(1): ctime comparison: subtraction is not comparison; ok millert@
Diffstat (limited to 'usr.bin/at')
-rw-r--r--usr.bin/at/at.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/at/at.c b/usr.bin/at/at.c
index eb737e0e910..4c7cbf6cb81 100644
--- a/usr.bin/at/at.c
+++ b/usr.bin/at/at.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: at.c,v 1.82 2019/06/28 13:35:00 deraadt Exp $ */
+/* $OpenBSD: at.c,v 1.83 2019/11/29 03:12:35 cheloha Exp $ */
/*
* at.c : Put file into atrun queue
@@ -378,7 +378,7 @@ byctime(const void *v1, const void *v2)
const struct atjob *j1 = *(const struct atjob **)v1;
const struct atjob *j2 = *(const struct atjob **)v2;
- return (j1->ctime - j2->ctime);
+ return (j1->ctime < j2->ctime) ? -1 : (j1->ctime > j2->ctime);
}
/* Sort by job number (and thus execution time). */