diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/talk.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/talk.h b/apps/talk.h index b4aa344916..d5f3bb2996 100644 --- a/apps/talk.h +++ b/apps/talk.h | |||
@@ -70,13 +70,13 @@ enum talk_status { | |||
70 | 70 | ||
71 | /* make a "talkable" ID from number + unit | 71 | /* make a "talkable" ID from number + unit |
72 | unit is upper 4 bits, number the remaining (in regular 2's complement) */ | 72 | unit is upper 4 bits, number the remaining (in regular 2's complement) */ |
73 | #define TALK_ID(n,u) (((long)(u))<<UNIT_SHIFT | ((n) & ~(-1L<<DECIMAL_SHIFT))) | 73 | #define TALK_ID(n,u) (((long)(u))<<UNIT_SHIFT | ((n) & ~(((unsigned int)-1L)<<DECIMAL_SHIFT))) |
74 | 74 | ||
75 | /* make a "talkable" ID from a decimal number + unit, the decimal number | 75 | /* make a "talkable" ID from a decimal number + unit, the decimal number |
76 | is represented like x*10^d where d is the number of decimal digits */ | 76 | is represented like x*10^d where d is the number of decimal digits */ |
77 | #define TALK_ID_DECIMAL(n,d,u) (((long)(u))<<UNIT_SHIFT |\ | 77 | #define TALK_ID_DECIMAL(n,d,u) (((long)(u))<<UNIT_SHIFT |\ |
78 | ((long)(d))<<DECIMAL_SHIFT |\ | 78 | ((long)(d))<<DECIMAL_SHIFT |\ |
79 | ((n) & ~(-1L<<DECIMAL_SHIFT))) | 79 | ((n) & ~(((unsigned int)-1L)<<DECIMAL_SHIFT))) |
80 | 80 | ||
81 | /* convenience macro to have both virtual pointer and ID as arguments */ | 81 | /* convenience macro to have both virtual pointer and ID as arguments */ |
82 | #define STR(id) ID2P(id), id | 82 | #define STR(id) ID2P(id), id |