make style
This commit is contained in:
@@ -69,12 +69,12 @@ static int l_GetFromBigBuf(lua_State *L) {
|
||||
startindex = luaL_checknumber(L, 1);
|
||||
len = luaL_checknumber(L, 2);
|
||||
}
|
||||
|
||||
if ( len == 0 ) {
|
||||
|
||||
if (len == 0) {
|
||||
//signal error by returning Nil, errorstring
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, "You need to supply number of bytes larger than zero");
|
||||
return 2; // two return values
|
||||
return 2; // two return values
|
||||
}
|
||||
|
||||
uint8_t *data = calloc(len, sizeof(uint8_t));
|
||||
@@ -125,13 +125,13 @@ static int l_GetFromFlashMem(lua_State *L) {
|
||||
startindex = luaL_checknumber(L, 1);
|
||||
len = luaL_checknumber(L, 2);
|
||||
}
|
||||
|
||||
if ( len == 0 ) {
|
||||
|
||||
if (len == 0) {
|
||||
//signal error by returning Nil, errorstring
|
||||
lua_pushnil(L);
|
||||
lua_pushstring(L, "You need to supply number of bytes larger than zero");
|
||||
return 2; // two return values
|
||||
}
|
||||
return 2; // two return values
|
||||
}
|
||||
|
||||
uint8_t *data = calloc(len, sizeof(uint8_t));
|
||||
if (!data) {
|
||||
|
||||
Reference in New Issue
Block a user