20 lines
538 B
Text
20 lines
538 B
Text
$NetBSD: patch-af,v 1.2 2015/12/29 23:34:45 dholland Exp $
|
|
|
|
Don't compare pointers by subtraction.
|
|
|
|
--- tr_sub.c.orig 2006-02-24 18:32:10.000000000 +0000
|
|
+++ tr_sub.c
|
|
@@ -711,11 +711,8 @@ struct term *a1,*a2;
|
|
int cmp_fp(a1,a2)
|
|
struct term *a1,*a2;
|
|
{
|
|
- register int cp;
|
|
-
|
|
- cp = filep_value(a1) - filep_value(a2);
|
|
- if (cp == 0) return(ARG_EQ);
|
|
- else if (cp > 0) return(ARG_TRUE);
|
|
+ if (filep_value(a1) == filep_value(a2)) return(ARG_EQ);
|
|
+ else if (filep_value(a1) > filep_value(a2)) return(ARG_TRUE);
|
|
else return(ARG_FALSE);
|
|
}
|
|
|