fmap: fmap_create() takes const name fmap_create() doesn't modify this param. BUG=b:288327526 TEST=build Change-Id: Icd2c4a2a57e13e27fe22a664ce40b4727afdf4ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashmap/+/5034761 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Commit-Queue: Brian Norris <briannorris@chromium.org> Tested-by: Brian Norris <briannorris@chromium.org>
diff --git a/lib/fmap.c b/lib/fmap.c index 860ff89..c5912b8 100644 --- a/lib/fmap.c +++ b/lib/fmap.c
@@ -293,7 +293,7 @@ } /* allocate and initialize a new fmap structure */ -struct fmap *fmap_create(uint64_t base, uint32_t size, uint8_t *name) +struct fmap *fmap_create(uint64_t base, uint32_t size, const uint8_t *name) { struct fmap *fmap;
diff --git a/lib/fmap.h b/lib/fmap.h index ca75a17..571e486 100644 --- a/lib/fmap.h +++ b/lib/fmap.h
@@ -148,7 +148,7 @@ * returns NULL to indicate failure */ extern struct fmap *fmap_create(uint64_t base, - uint32_t size, uint8_t *name); + uint32_t size, const uint8_t *name); /* free memory used by an fmap structure */ extern void fmap_destroy(struct fmap *fmap);