Commit Diff


commit - cf2784df752095e7f81d4ea55ef6a7f1fb6224c4
commit + 8bb1b2363302a31c91ba921580d3227ccd3e878c
blob - 7651f9bc188dd361ea875e8fd5a4c8683dd84f49
blob + 64cbc3bd39667bec13ea6f830d3435eaa833a50b
--- gmid.h
+++ gmid.h
@@ -455,7 +455,6 @@ int		 puny_decode(const char*, char*, size_t, const ch
 const char	*strip_path(const char *, int);
 int		 starts_with(const char*, const char*);
 int		 ends_with(const char*, const char*);
-ssize_t		 filesize(int);
 char		*absolutify_path(const char*);
 char		*xstrdup(const char*);
 void		*xcalloc(size_t, size_t);
blob - a968159ae4eae4677fb35f8dbe4668fad41e712f
blob + 4485f899a5f154db521cd7d2dba27eaef9a50675
--- utils.c
+++ utils.c
@@ -76,18 +76,6 @@ ends_with(const char *str, const char *sufx)
 		if (str[i] != sufx[j])
 			return 0;
 	return 1;
-}
-
-ssize_t
-filesize(int fd)
-{
-	ssize_t len;
-
-	if ((len = lseek(fd, 0, SEEK_END)) == -1)
-		return -1;
-	if (lseek(fd, 0, SEEK_SET) == -1)
-		return -1;
-	return len;
 }
 
 char *