projects
/
seabios.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
843a62c
)
Fix bug in SET_FARVAR.
author
Kevin O'Connor
<kevin@koconnor.net>
Sun, 9 Mar 2008 15:53:22 +0000
(11:53 -0400)
committer
Kevin O'Connor
<kevin@koconnor.net>
Sun, 9 Mar 2008 15:53:22 +0000
(11:53 -0400)
The (val) parameter needs to be evaluated before setting the segment.
src/farptr.h
patch
|
blob
|
history
diff --git
a/src/farptr.h
b/src/farptr.h
index e142843791c47b304df4d324c76009efedca06bc..4759a08945003f4f8287f3134c49c1d3a90f2c0b 100644
(file)
--- a/
src/farptr.h
+++ b/
src/farptr.h
@@
-69,8
+69,9
@@
extern void __force_link_error__unknown_type();
SET_SEG(ES, (seg)); \
GET_VAR(ES, (var)); })
#define SET_FARVAR(seg, var, val) do { \
+ typeof(var) __sfv_val = (val); \
SET_SEG(ES, (seg)); \
- SET_VAR(ES, (var),
val);
\
+ SET_VAR(ES, (var),
__sfv_val);
\
} while (0)
#define PTR_TO_SEG(p) ((((u32)(p)) >> 4) & 0xf000)