make style

This commit is contained in:
Philippe Teuwen 2019-09-05 00:48:48 +02:00
parent 22c5364a23
commit ecb535cc58
3 changed files with 10 additions and 10 deletions

View file

@ -209,7 +209,7 @@ static int CmdFlashMemLoad(const char *Cmd) {
datalen += 2;
break;
case DICTIONARY_NONE:
res = loadFile_safe(filename, ".bin", (void**)&data, &datalen);
res = loadFile_safe(filename, ".bin", (void **)&data, &datalen);
if (res != PM3_SUCCESS) {
free(data);
return PM3_EFILE;

View file

@ -355,13 +355,13 @@ static int CmdFlashMemSpiFFSLoad(const char *Cmd) {
size_t datalen = 0;
uint8_t *data = NULL;
int res = loadFile_safe(filename, "", (void**)&data, &datalen);
int res = loadFile_safe(filename, "", (void **)&data, &datalen);
// int res = loadFileEML( filename, data, &datalen);
if (res != PM3_SUCCESS) {
free(data);
return PM3_EFILE;
}
// We want to mount before multiple operation so the lazy writes/append will not
// trigger a mount + umount each loop iteration (lazy ops device side)
SendCommandNG(CMD_SPIFFS_MOUNT, NULL, 0);

View file

@ -1059,20 +1059,20 @@ static int l_searchfile(lua_State *L) {
if (n != 2) {
return returnToLuaWithError(L, "Only filename and extension");
}
size_t size;
// data
// data
const char *filename = luaL_checklstring(L, 1, &size);
if ( size == 0 )
if (size == 0)
return returnToLuaWithError(L, "Must specify filename");
const char *suffix = luaL_checklstring(L, 2, &size);
const char *suffix = luaL_checklstring(L, 2, &size);
char *path;
int res = searchFile(&path, "", filename, suffix, false);
if ( res != PM3_SUCCESS) {
if (res != PM3_SUCCESS) {
return returnToLuaWithError(L, "Failed to find file");
}
lua_pushstring(L, path);
return 1;
}