dirvec: constant pointers in dirvec_find()

dirvec_find() does not modify the object, thus it should get a const
pointer.
This commit is contained in:
Max Kellermann 2008-10-09 15:24:34 +02:00
parent 68f716a28b
commit a5480108f8
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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);