Commit a5480108 authored by Max Kellermann's avatar Max Kellermann

dirvec: constant pointers in dirvec_find()

dirvec_find() does not modify the object, thus it should get a const pointer.
parent 68f716a2
......@@ -22,7 +22,7 @@ void dirvec_sort(struct dirvec *dv)
qsort(dv->base, dv->nr, sizeof(struct directory *), dirvec_cmp);
}
struct directory *dirvec_find(struct dirvec *dv, const char *path)
struct directory *dirvec_find(const struct dirvec *dv, const char *path)
{
int i;
......
......@@ -10,7 +10,7 @@ struct dirvec {
void dirvec_sort(struct dirvec *dv);
struct directory *dirvec_find(struct dirvec *dv, const char *path);
struct directory *dirvec_find(const struct dirvec *dv, const char *path);
int dirvec_delete(struct dirvec *dv, struct directory *del);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment