Skip to content

Commit

Permalink
some minor comment nitpick
Browse files Browse the repository at this point in the history
  • Loading branch information
N-R-K committed Jun 18, 2024
1 parent 1fbff6d commit 9b8cdcf
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion autoreload.c
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
3 changes: 1 addition & 2 deletions main.c
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,6 @@ static void update_info(void)
open_title();
}

/* update bar contents */
if (win.bar.h == 0 || extprefix)
return;

Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions nsxiv.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -265,7 +265,7 @@ struct opt {
/* window: */
bool fullscreen;
bool hide_bar;
Window embed; /* unsigned long */
Window embed;
char *geometry;
char *res_name;

Expand Down
2 changes: 1 addition & 1 deletion thumbs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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! */
Expand Down

0 comments on commit 9b8cdcf

Please sign in to comment.