wm: teppich

Download patch

ref: 2583a6cc4b07f282663d58a398be363fa5e9558c
parent: 0c284ab6ef15350e506a90dfe2caca0a8849a24d
author: mkf <mkf@cloud9p.org>
date: Thu Dec 7 12:55:28 EST 2023

vfs: remove unused variable in dirname()

--- a/fs/vfs.c
+++ b/fs/vfs.c
@@ -94,11 +94,11 @@
 	return nil;
 }
 
+/* works like basename -d, sorta */
 char*
 dirname(char *s, char c)
 {
 	int last;
-	char *t;
 	
 	last = 0;
 	for(int i = 0 ; i < strlen(s) ; i++)
@@ -109,6 +109,6 @@
 
 	if(last == 0)
 		return nil;
-	t = (char*)malloc(last+1);
+
 	return strncpy(s, s, last);
 }