aboutsummaryrefslogtreecommitdiff
path: root/lbitlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-02-21 10:44:53 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-02-21 10:44:53 -0300
commita83ed55f1e3e20f73d01489c18889bb8554593ce (patch)
tree816177a00ce20b36503b6a48bb7d1956c0432859 /lbitlib.c
parentb559aed2d38c6eafcc624da8599b6ac52e11f17c (diff)
downloadlua-a83ed55f1e3e20f73d01489c18889bb8554593ce.tar.gz
lua-a83ed55f1e3e20f73d01489c18889bb8554593ce.tar.bz2
lua-a83ed55f1e3e20f73d01489c18889bb8554593ce.zip
added 'return' (when possible) to calls to error functions
Diffstat (limited to 'lbitlib.c')
-rw-r--r--lbitlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lbitlib.c b/lbitlib.c
index 705ca343..c222e574 100644
--- a/lbitlib.c
+++ b/lbitlib.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lbitlib.c,v 1.15 2010/12/17 13:26:38 roberto Exp roberto $ 2** $Id: lbitlib.c,v 1.16 2011/06/20 16:35:23 roberto Exp roberto $
3** Standard library for bitwise operations 3** Standard library for bitwise operations
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -155,7 +155,7 @@ static int fieldargs (lua_State *L, int farg, int *width) {
155 luaL_argcheck(L, 0 <= f, farg, "field cannot be negative"); 155 luaL_argcheck(L, 0 <= f, farg, "field cannot be negative");
156 luaL_argcheck(L, 0 < w, farg + 1, "width must be positive"); 156 luaL_argcheck(L, 0 < w, farg + 1, "width must be positive");
157 if (f + w > LUA_NBITS) 157 if (f + w > LUA_NBITS)
158 luaL_error(L, "trying to access non-existent bits"); 158 return luaL_error(L, "trying to access non-existent bits");
159 *width = w; 159 *width = w;
160 return f; 160 return f;
161} 161}