summaryrefslogtreecommitdiff
path: root/core/src/xmake/os/mtime.c
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/xmake/os/mtime.c')
-rw-r--r--core/src/xmake/os/mtime.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/core/src/xmake/os/mtime.c b/core/src/xmake/os/mtime.c
index 09c988caa..0dd10c7ca 100644
--- a/core/src/xmake/os/mtime.c
+++ b/core/src/xmake/os/mtime.c
@@ -22,8 +22,8 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* trace
*/
-#define TB_TRACE_MODULE_NAME "mtime"
-#define TB_TRACE_MODULE_DEBUG (0)
+#define TB_TRACE_MODULE_NAME "mtime"
+#define TB_TRACE_MODULE_DEBUG (0)
/* //////////////////////////////////////////////////////////////////////////////////////
* includes
@@ -33,19 +33,19 @@
/* //////////////////////////////////////////////////////////////////////////////////////
* implementation
*/
-tb_int_t xm_os_mtime(lua_State* lua)
-{
- // check
+tb_int_t xm_os_mtime(lua_State *lua) {
tb_assert_and_check_return_val(lua, 0);
// get the path
- tb_char_t const* path = luaL_checkstring(lua, 1);
+ tb_char_t const *path = luaL_checkstring(lua, 1);
tb_check_return_val(path, 0);
// os.mtime(path)
- tb_file_info_t info = {0};
- if (tb_file_info(path, &info))
+ tb_file_info_t info = { 0 };
+ if (tb_file_info(path, &info)) {
lua_pushinteger(lua, (lua_Integer)info.mtime);
- else lua_pushinteger(lua, 0);
+ } else {
+ lua_pushinteger(lua, 0);
+ }
return 1;
}