OSDN Git Service

Constify efidp_make_acpi_hid_ex() args and make its prototype more readible
authorPeter Jones <pjones@redhat.com>
Wed, 6 Jun 2018 21:09:30 +0000 (17:09 -0400)
committerPeter Jones <pmjones@gmail.com>
Fri, 8 Jun 2018 19:11:37 +0000 (15:11 -0400)
Signed-off-by: Peter Jones <pjones@redhat.com>
src/dp-acpi.c
src/include/efivar/efivar-dp.h

index f003cc4..70162f3 100644 (file)
@@ -262,7 +262,8 @@ efidp_make_acpi_hid(uint8_t *buf, ssize_t size, uint32_t hid, uint32_t uid)
 ssize_t PUBLIC NONNULL(6, 7, 8)
 efidp_make_acpi_hid_ex(uint8_t *buf, ssize_t size,
                       uint32_t hid, uint32_t uid, uint32_t cid,
-                      char *hidstr, char *uidstr, char *cidstr)
+                      const char *hidstr, const char *uidstr,
+                      const char *cidstr)
 {
        efidp_acpi_hid_ex *acpi_hid = (efidp_acpi_hid_ex *)buf;
        ssize_t req;
index 9bbb5de..106d364 100644 (file)
@@ -133,10 +133,11 @@ typedef struct {
        /* three ascii string fields follow */
        char            hidstr[];
 } EFIVAR_PACKED efidp_acpi_hid_ex;
-extern ssize_t efidp_make_acpi_hid_ex(uint8_t *buf, ssize_t size, uint32_t hid,
-                                     uint32_t uid, uint32_t cid, char *hidstr,
-                                     char *uidstr, char *cidstr)
-       __attribute__((__nonnull__ (6,7,8)));
+extern ssize_t __attribute__((__nonnull__ (6,7,8)))
+efidp_make_acpi_hid_ex(uint8_t *buf, ssize_t size,
+                       uint32_t hid, uint32_t uid, uint32_t cid,
+                       const char *hidstr, const char *uidstr,
+                       const char *cidstr);
 
 #define EFIDP_PNP_EISA_ID_CONST                0x41d0
 #define EFIDP_PNP_ACPI_ID_CONST                0x8e09