author | Lars Hjemli <hjemli@gmail.com> | 2007-05-23 17:22:20 (UTC) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2007-05-23 17:22:20 (UTC) |
commit | 25da3f76255754c8b3f98232a5eb84f47088d0f7 (patch) (unidiff) | |
tree | 10987948441e8f211ecd31360742f1306fd9a46c | |
parent | 57f6a8bf0de6c112cabc1d8e20ade2698bd886b7 (diff) | |
download | cgit-25da3f76255754c8b3f98232a5eb84f47088d0f7.zip cgit-25da3f76255754c8b3f98232a5eb84f47088d0f7.tar.gz cgit-25da3f76255754c8b3f98232a5eb84f47088d0f7.tar.bz2 |
Remove unused variable from ui-repolist.c:read_agefile()
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
-rw-r--r-- | ui-repolist.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/ui-repolist.c b/ui-repolist.c index 573c730..e5c6c20 100644 --- a/ui-repolist.c +++ b/ui-repolist.c | |||
@@ -1,41 +1,40 @@ | |||
1 | /* ui-repolist.c: functions for generating the repolist page | 1 | /* ui-repolist.c: functions for generating the repolist page |
2 | * | 2 | * |
3 | * Copyright (C) 2006 Lars Hjemli | 3 | * Copyright (C) 2006 Lars Hjemli |
4 | * | 4 | * |
5 | * Licensed under GNU General Public License v2 | 5 | * Licensed under GNU General Public License v2 |
6 | * (see COPYING for full license text) | 6 | * (see COPYING for full license text) |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "cgit.h" | 9 | #include "cgit.h" |
10 | #include <time.h> | 10 | #include <time.h> |
11 | 11 | ||
12 | 12 | ||
13 | time_t read_agefile(char *path) | 13 | time_t read_agefile(char *path) |
14 | { | 14 | { |
15 | FILE *f; | 15 | FILE *f; |
16 | static char buf[64], buf2[64]; | 16 | static char buf[64], buf2[64]; |
17 | struct tm tm; | ||
18 | 17 | ||
19 | if (!(f = fopen(path, "r"))) | 18 | if (!(f = fopen(path, "r"))) |
20 | return -1; | 19 | return -1; |
21 | fgets(buf, sizeof(buf), f); | 20 | fgets(buf, sizeof(buf), f); |
22 | fclose(f); | 21 | fclose(f); |
23 | if (parse_date(buf, buf2, sizeof(buf2))) | 22 | if (parse_date(buf, buf2, sizeof(buf2))) |
24 | return strtoul(buf2, NULL, 10); | 23 | return strtoul(buf2, NULL, 10); |
25 | else | 24 | else |
26 | return 0; | 25 | return 0; |
27 | } | 26 | } |
28 | 27 | ||
29 | static void print_modtime(struct repoinfo *repo) | 28 | static void print_modtime(struct repoinfo *repo) |
30 | { | 29 | { |
31 | char *path; | 30 | char *path; |
32 | struct stat s; | 31 | struct stat s; |
33 | 32 | ||
34 | path = fmt("%s/%s", repo->path, cgit_agefile); | 33 | path = fmt("%s/%s", repo->path, cgit_agefile); |
35 | if (stat(path, &s) == 0) { | 34 | if (stat(path, &s) == 0) { |
36 | cgit_print_age(read_agefile(path), -1, NULL); | 35 | cgit_print_age(read_agefile(path), -1, NULL); |
37 | return; | 36 | return; |
38 | } | 37 | } |
39 | 38 | ||
40 | path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch); | 39 | path = fmt("%s/refs/heads/%s", repo->path, repo->defbranch); |
41 | if (stat(path, &s) != 0) | 40 | if (stat(path, &s) != 0) |