From 873aa90e0411fe7a5c0cfd0cd6e89a890dc890f2 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Tue, 4 Jul 2017 15:23:20 +0200 Subject: remove own strdup --- xdu.c | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/xdu.c b/xdu.c index 8d5f4f4..fb44488 100644 --- a/xdu.c +++ b/xdu.c @@ -608,24 +608,10 @@ pwd(void) if (num != 0) strcat(path,"/"); } - printf("%s %d (%.2f%%)\n", path, topp->size, + printf("%s %jd (%.2f%%)\n", path, (intmax_t)topp->size, 100.0*topp->size/rootp->size); } -char * -strdup(s) -char *s; -{ - int n; - char *cp; - - n = strlen(s); - cp = malloc(n+1); - strcpy(cp,s); - - return cp; -} - /**************** External Entry Points ****************/ void -- cgit 1.4.1