aboutsummaryrefslogtreecommitdiffstats
path: root/com32/hdt
diff options
context:
space:
mode:
authorPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-14 15:58:36 -0700
committerPierre-Alexandre Meyer <pierre@mouraf.org>2009-03-14 15:58:36 -0700
commit3fab33391cf284e2d4c9f7c0f833bb5c3aa0ffcf (patch)
tree3ed6a369fbe8e33eb305f52484f33b9524fbca09 /com32/hdt
parent552d7756c78943e92e2081b161d4b0b40f3346d5 (diff)
downloadsyslinux.git-3fab33391cf284e2d4c9f7c0f833bb5c3aa0ffcf.tar.gz
syslinux.git-3fab33391cf284e2d4c9f7c0f833bb5c3aa0ffcf.tar.xz
syslinux.git-3fab33391cf284e2d4c9f7c0f833bb5c3aa0ffcf.zip
hdt: find_argument should return a const char*
Impact: Fix compilation warning, signature change. Handle command line arguments as const. This fixes a compilation warning. Signed-off-by: Pierre-Alexandre Meyer <pierre@mouraf.org>
Diffstat (limited to 'com32/hdt')
-rw-r--r--com32/hdt/hdt-common.c4
-rw-r--r--com32/hdt/hdt-common.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/com32/hdt/hdt-common.c b/com32/hdt/hdt-common.c
index 1516c002..b6269684 100644
--- a/com32/hdt/hdt-common.c
+++ b/com32/hdt/hdt-common.c
@@ -371,11 +371,11 @@ void cpu_detect(struct s_hardware *hardware)
* Find the last instance of a particular command line argument
* (which should include the final =; do not use for boolean arguments)
*/
-char *find_argument(const char **argv, const char *argument)
+const char *find_argument(const char **argv, const char *argument)
{
int la = strlen(argument);
const char **arg;
- char *ptr = NULL;
+ const char *ptr = NULL;
for (arg = argv; *arg; arg++) {
if (!memcmp(*arg, argument, la))
diff --git a/com32/hdt/hdt-common.h b/com32/hdt/hdt-common.h
index 9293ec05..8bec501d 100644
--- a/com32/hdt/hdt-common.h
+++ b/com32/hdt/hdt-common.h
@@ -120,7 +120,7 @@ struct s_hardware {
char pciids_path[255];
};
-char *find_argument(const char **argv, const char *argument);
+const char *find_argument(const char **argv, const char *argument);
int detect_dmi(struct s_hardware *hardware);
void detect_disks(struct s_hardware *hardware);
void detect_pci(struct s_hardware *hardware);