aboutsummaryrefslogtreecommitdiff
path: root/src/farptr.h
diff options
context:
space:
mode:
authorKevin O'Connor <kevin@koconnor.net>2008-03-09 11:53:22 -0400
committerKevin O'Connor <kevin@koconnor.net>2008-03-09 11:53:22 -0400
commit16375ab5fb4fb0eae8e71dd14207080235e4c892 (patch)
treee859ef0af10fb6673976abc46febc7f56139b7b0 /src/farptr.h
parent843a62c3e54154077f0197f009491e2a712c3175 (diff)
downloadseabios-hppa-16375ab5fb4fb0eae8e71dd14207080235e4c892.zip
seabios-hppa-16375ab5fb4fb0eae8e71dd14207080235e4c892.tar.gz
seabios-hppa-16375ab5fb4fb0eae8e71dd14207080235e4c892.tar.bz2
Fix bug in SET_FARVAR.
The (val) parameter needs to be evaluated before setting the segment.
Diffstat (limited to 'src/farptr.h')
-rw-r--r--src/farptr.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/farptr.h b/src/farptr.h
index e142843..4759a08 100644
--- 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)