Commits

Anonymous committed 43beadb

change path from char[] to char* and use strdup not strcpy

  • Participants
  • Parent commits 04f09b6

Comments (0)

Files changed (1)

 struct watch {
 	int wd;
 	pid_t pid;
-	char path[PATH_MAX];
+	char *path;
 	struct watch *next;
 };
 
 	watches = w;
 
 	w->wd = wd;
-	strcpy(w->path, fpath);
+	strdup(w->path, fpath);
 
 	win(w);