Commit ff401d3f81bb8cfcec28162de07236a355aa3212

Authored by Heinrich Schuchardt
Committed by Alexander Graf
1 parent cb90ee9757

efi_loader: efi_dp_match should have const arguments

efi_dp_match does not change its arguments.
So they should be marked as const.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

Showing 2 changed files with 4 additions and 2 deletions Side-by-side Diff

include/efi_loader.h
... ... @@ -252,7 +252,8 @@
252 252  
253 253  
254 254 struct efi_device_path *efi_dp_next(const struct efi_device_path *dp);
255   -int efi_dp_match(struct efi_device_path *a, struct efi_device_path *b);
  255 +int efi_dp_match(const struct efi_device_path *a,
  256 + const struct efi_device_path *b);
256 257 struct efi_object *efi_dp_find_obj(struct efi_device_path *dp,
257 258 struct efi_device_path **rem);
258 259 unsigned efi_dp_size(const struct efi_device_path *dp);
lib/efi_loader/efi_device_path.c
... ... @@ -68,7 +68,8 @@
68 68 * representing a device with one representing a file on the device, or
69 69 * a device with a parent device.
70 70 */
71   -int efi_dp_match(struct efi_device_path *a, struct efi_device_path *b)
  71 +int efi_dp_match(const struct efi_device_path *a,
  72 + const struct efi_device_path *b)
72 73 {
73 74 while (1) {
74 75 int ret;