Comparison

util-src/pposix.c @ 5717:bf98912a4f5b

util.pposix: setrlimit(): Add missing return on error when an incorrect number of arguments are passed
author Matthew Wild <mwild1@gmail.com>
date Fri, 28 Jun 2013 20:16:43 +0100
parent 5451:941ad88db8f3
child 5720:449399a7e136
child 5812:57ebf93ec720
comparison
equal deleted inserted replaced
5716:8a0465de172e 5717:bf98912a4f5b
498 const char *resource = NULL; 498 const char *resource = NULL;
499 int rid = -1; 499 int rid = -1;
500 if(arguments < 1 || arguments > 3) { 500 if(arguments < 1 || arguments > 3) {
501 lua_pushboolean(L, 0); 501 lua_pushboolean(L, 0);
502 lua_pushstring(L, "incorrect-arguments"); 502 lua_pushstring(L, "incorrect-arguments");
503 return 2;
503 } 504 }
504 505
505 resource = luaL_checkstring(L, 1); 506 resource = luaL_checkstring(L, 1);
506 softlimit = luaL_checkinteger(L, 2); 507 softlimit = luaL_checkinteger(L, 2);
507 hardlimit = luaL_checkinteger(L, 3); 508 hardlimit = luaL_checkinteger(L, 3);