summaryrefslogtreecommitdiff
path: root/misc.c
diff options
context:
space:
mode:
Diffstat (limited to 'misc.c')
-rw-r--r--misc.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/misc.c b/misc.c
index bdc06fdb3..dd74c8d45 100644
--- a/misc.c
+++ b/misc.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: misc.c,v 1.133 2018/10/05 14:26:09 naddy Exp $ */ 1/* $OpenBSD: misc.c,v 1.134 2018/11/16 03:26:01 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved. 4 * Copyright (c) 2005,2006 Damien Miller. All rights reserved.
@@ -2037,3 +2037,10 @@ format_absolute_time(uint64_t t, char *buf, size_t len)
2037 localtime_r(&tt, &tm); 2037 localtime_r(&tt, &tm);
2038 strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm); 2038 strftime(buf, len, "%Y-%m-%dT%H:%M:%S", &tm);
2039} 2039}
2040
2041/* check if path is absolute */
2042int
2043path_absolute(const char *path)
2044{
2045 return (*path == '/') ? 1 : 0;
2046}