aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/components.c1
-rw-r--r--src/fs.c2
-rw-r--r--src/site.c12
3 files changed, 6 insertions, 9 deletions
diff --git a/src/components.c b/src/components.c
index 08ab556..abd1303 100644
--- a/src/components.c
+++ b/src/components.c
@@ -10,7 +10,6 @@
#include "fs.h"
#include "log.h"
#include "site.h"
-#include "roscha.h"
#define MAXTIME \
((unsigned long long)1 << ((sizeof(time_t) * CHAR_BIT) - 1)) - 1
diff --git a/src/fs.c b/src/fs.c
index d1bcff0..b9f43f7 100644
--- a/src/fs.c
+++ b/src/fs.c
@@ -1,14 +1,12 @@
#include "fs.h"
#include "log.h"
-#include "config.h"
#include "vector.h"
#include "slice.h"
#include <fcntl.h>
#include <stdio.h>
-#include <ctype.h>
#include <unistd.h>
#include <stdint.h>
#include <stdlib.h>
diff --git a/src/site.c b/src/site.c
index 59cd669..83852f2 100644
--- a/src/site.c
+++ b/src/site.c
@@ -36,14 +36,14 @@ prerm_imagedir(const char *path, void *data)
return false;
}
if (S_ISDIR(st.st_mode)) {
- struct image *prev, *next = NULL;
+ struct image *prev = NULL, *next = NULL, *cur;
size_t i;
- vector_foreach (album->images, i, prev) {
- if (prev->tstamp > st.st_mtim.tv_sec) {
- prev = next;
+ vector_foreach (album->images, i, cur) {
+ if (cur->tstamp > st.st_mtim.tv_sec) {
+ next = cur;
break;
}
- next = prev;
+ prev = cur;
}
if (prev) {
if (!prev->modified) {
@@ -53,7 +53,7 @@ prerm_imagedir(const char *path, void *data)
}
}
}
- if (next != prev) {
+ if (next) {
if (!next->modified) {
joinpathb(htmlpath, next->dst, index_html);
if (!render_make_image(&album->site->render, htmlpath, next)) {