summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVicent Martí <vicent@github.com>2013-10-31 06:35:01 -0700
committerVicent Martí <vicent@github.com>2013-10-31 06:35:01 -0700
commitf93f3790c511d3ed821bf63fdaf5aeec155e195b (patch)
treefa26fd7d9eeaa3bd90fedaa5e7a0a48e39426e83
parentff0ef88c5bb570ea2553ba6ea99236a68d39f950 (diff)
parent864e72719c9658336aa2a769e4592e8efeb8b4ef (diff)
downloadlibgit2-f93f3790c511d3ed821bf63fdaf5aeec155e195b.tar.gz
Merge pull request #1924 from linquize/gmtime
Use gmtime() instead of gmtime_t()
-rw-r--r--examples/log.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/log.c b/examples/log.c
index 4c2df07c9..81b056cc5 100644
--- a/examples/log.c
+++ b/examples/log.c
@@ -125,7 +125,7 @@ static int add_revision(struct log_state *s, const char *revstr)
static void print_time(const git_time *intime, const char *prefix)
{
char sign, out[32];
- struct tm intm;
+ struct tm *intm;
int offset, hours, minutes;
time_t t;
@@ -142,8 +142,8 @@ static void print_time(const git_time *intime, const char *prefix)
t = (time_t)intime->time + (intime->offset * 60);
- gmtime_r(&t, &intm);
- strftime(out, sizeof(out), "%a %b %e %T %Y", &intm);
+ intm = gmtime(&t);
+ strftime(out, sizeof(out), "%a %b %e %T %Y", intm);
printf("%s%s %c%02d%02d\n", prefix, out, sign, hours, minutes);
}