aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNRK <nrk@disroot.org>2024-06-12 23:34:11 +0200
committerNRK <nrk@disroot.org>2024-06-18 17:11:36 +0200
commit9b8cdcff482a518c24d31ce74524543bb7015102 (patch)
tree6822284dedd1da944ad306664e2b48dd0a6f682d
parent1fbff6d5392f8914bcc471b8472e81b5a4a703df (diff)
downloadnsxiv-9b8cdcff482a518c24d31ce74524543bb7015102.tar.zst
some minor comment nitpickHEADmaster
-rw-r--r--autoreload.c2
-rw-r--r--main.c3
-rw-r--r--nsxiv.h4
-rw-r--r--thumbs.c2
4 files changed, 5 insertions, 6 deletions
diff --git a/autoreload.c b/autoreload.c
index 8325210..1a889dc 100644
--- a/autoreload.c
+++ b/autoreload.c
@@ -85,7 +85,7 @@ void arl_add(arl_t *arl, const char *filepath)
add_watch(arl->fd, &arl->wd_file, filepath, IN_CLOSE_WRITE | IN_DELETE_SELF);
base = strrchr(filepath, '/');
- assert(base != NULL); /* filepath must be result of `realpath(3)` */
+ assert(base != NULL && "filepath must be result of realpath(3)");
dir = arl_scratch_push(filepath, MAX(base - filepath, 1));
add_watch(arl->fd, &arl->wd_dir, dir, IN_CREATE | IN_MOVED_TO);
arl->filename = arl_scratch_push(base + 1, strlen(base + 1));
diff --git a/main.c b/main.c
index d73988e..74776fe 100644
--- a/main.c
+++ b/main.c
@@ -460,7 +460,6 @@ static void update_info(void)
open_title();
}
- /* update bar contents */
if (win.bar.h == 0 || extprefix)
return;
@@ -841,7 +840,7 @@ static void run(void)
}
} while (discard);
- switch (ev.type) { /* handle events */
+ switch (ev.type) {
case ButtonPress:
on_buttonpress(&ev.xbutton);
break;
diff --git a/nsxiv.h b/nsxiv.h
index 978962e..ccd1796 100644
--- a/nsxiv.h
+++ b/nsxiv.h
@@ -101,7 +101,7 @@ typedef enum {
typedef struct {
const char *name; /* as given by user */
- const char *path; /* always absolute */
+ const char *path; /* always absolute, result of realpath(3) */
fileflags_t flags;
} fileinfo_t;
@@ -265,7 +265,7 @@ struct opt {
/* window: */
bool fullscreen;
bool hide_bar;
- Window embed; /* unsigned long */
+ Window embed;
char *geometry;
char *res_name;
diff --git a/thumbs.c b/thumbs.c
index d91405e..9909333 100644
--- a/thumbs.c
+++ b/thumbs.c
@@ -43,7 +43,7 @@ static char *tns_cache_filepath(const char *filepath)
size_t len;
char *cfile = NULL;
- assert(*filepath == '/' && "filepath should be result of realpath(3)");
+ assert(*filepath == '/' && "filepath must be result of realpath(3)");
if (strncmp(filepath, cache_dir, strlen(cache_dir)) != 0) {
/* don't cache images inside the cache directory! */