aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkoekeishiya <aasvi93@hotmail.com>2018-07-19 21:14:07 +0200
committerkoekeishiya <aasvi93@hotmail.com>2018-07-19 21:14:07 +0200
commit66f90b7ac685d9e1c79ca4c1075bbe69239f4681 (patch)
tree0453f5cc803996a1d1e82792d6530ed0d287dc5d
parent2f370cc12adb6e4050ee1766a5348576083415b1 (diff)
downloadskhd-66f90b7ac685d9e1c79ca4c1075bbe69239f4681.tar.gz
skhd-66f90b7ac685d9e1c79ca4c1075bbe69239f4681.zip
simplify hotloader; get rid of local var and mark function inline (For readability reasons)
-rw-r--r--src/hotload.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/hotload.c b/src/hotload.c
index 6e8ae02..854fd8e 100644
--- a/src/hotload.c
+++ b/src/hotload.c
@@ -66,7 +66,7 @@ resolve_symlink(char *file)
return NULL;
}
-internal struct watched_file *
+internal inline struct watched_file *
hotloader_watched_file(struct hotloader *hotloader, char *absolutepath)
{
struct watched_file *result = NULL;
@@ -88,8 +88,7 @@ internal FSEVENT_CALLBACK(hotloader_handler)
struct watched_file *watch_info;
for (unsigned index = 0; index < count; ++index) {
- char *absolutepath = files[index];
- if ((watch_info = hotloader_watched_file(hotloader, absolutepath))) {
+ if ((watch_info = hotloader_watched_file(hotloader, files[index]))) {
hotloader->callback(watch_info->absolutepath, watch_info->directory, watch_info->filename);
}
}