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:
parent
68f716a28b
commit
a5480108f8
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user