summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-31 16:18:24 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-03-31 16:18:24 -0300
commit3d1c6730daac6d2d0f33f3ed2372c235b6cf5286 (patch)
tree2fffc34ec5cf94f1477a5eb547ee8ecfe87ccc20
parent66b7b9b58294961bc07efe6ac4651663772c0e93 (diff)
downloadlua-3d1c6730daac6d2d0f33f3ed2372c235b6cf5286.tar.gz
lua-3d1c6730daac6d2d0f33f3ed2372c235b6cf5286.tar.bz2
lua-3d1c6730daac6d2d0f33f3ed2372c235b6cf5286.zip
detail ('1U' -> '1u', like other unsigned constants in the code)
-rw-r--r--lvm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index c536f74c..51dbc098 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.190 2014/03/15 12:29:48 roberto Exp roberto $ 2** $Id: lvm.c,v 2.191 2014/03/31 18:37:52 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -325,7 +325,7 @@ void luaV_objlen (lua_State *L, StkId ra, const TValue *rb) {
325 325
326 326
327lua_Integer luaV_div (lua_State *L, lua_Integer x, lua_Integer y) { 327lua_Integer luaV_div (lua_State *L, lua_Integer x, lua_Integer y) {
328 if (cast_unsigned(y) + 1 <= 1U) { /* special cases: -1 or 0 */ 328 if (cast_unsigned(y) + 1 <= 1u) { /* special cases: -1 or 0 */
329 if (y == 0) 329 if (y == 0)
330 luaG_runerror(L, "attempt to divide by zero"); 330 luaG_runerror(L, "attempt to divide by zero");
331 return intop(-, 0, x); /* y==-1; avoid overflow with 0x80000...//-1 */ 331 return intop(-, 0, x); /* y==-1; avoid overflow with 0x80000...//-1 */
@@ -341,7 +341,7 @@ lua_Integer luaV_div (lua_State *L, lua_Integer x, lua_Integer y) {
341 341
342 342
343lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y) { 343lua_Integer luaV_mod (lua_State *L, lua_Integer x, lua_Integer y) {
344 if (cast_unsigned(y) + 1 <= 1U) { /* special cases: -1 or 0 */ 344 if (cast_unsigned(y) + 1 <= 1u) { /* special cases: -1 or 0 */
345 if (y == 0) 345 if (y == 0)
346 luaG_runerror(L, "attempt to perform 'n%%0'"); 346 luaG_runerror(L, "attempt to perform 'n%%0'");
347 return 0; /* y==-1; avoid overflow with 0x80000...%-1 */ 347 return 0; /* y==-1; avoid overflow with 0x80000...%-1 */