public
/
ack.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1f07fc0
)
only change sign when value is not 0
author
ceriel
<none@none>
Wed, 29 Jun 1988 16:34:40 +0000
(16:34 +0000)
committer
ceriel
<none@none>
Wed, 29 Jun 1988 16:34:40 +0000
(16:34 +0000)
mach/proto/fp/ngf4.c
patch
|
blob
|
history
mach/proto/fp/ngf8.c
patch
|
blob
|
history
diff --git
a/mach/proto/fp/ngf4.c
b/mach/proto/fp/ngf4.c
index
7b2351f
..
540b1f1
100644
(file)
--- a/
mach/proto/fp/ngf4.c
+++ b/
mach/proto/fp/ngf4.c
@@
-21,7
+21,9
@@
_float f;
{
char unsigned *p;
- p = (char unsigned *) &f;
- *p ^= 0x80;
+ if (f != (_float) 0) {
+ p = (char unsigned *) &f;
+ *p ^= 0x80;
+ }
}
diff --git
a/mach/proto/fp/ngf8.c
b/mach/proto/fp/ngf8.c
index
178a9b7
..
b36a53c
100644
(file)
--- a/
mach/proto/fp/ngf8.c
+++ b/
mach/proto/fp/ngf8.c
@@
-21,7
+21,9
@@
_double f;
{
unsigned char *p;
- p = (unsigned char *) &f;
- *p ^= 0x80;
+ if (f[0] != 0 || f[1] != 0) {
+ p = (unsigned char *) &f;
+ *p ^= 0x80;
+ }
}