diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-12 12:47:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2023-05-12 12:47:09 +0000 |
commit | b959dcfcd0319d4311e67fa40ebb407605efc9d9 (patch) | |
tree | ac91bd6261967ff19b62a1859a4f544112ec4522 /lib.c | |
parent | Releasing debian version 4.2+20230313-1. (diff) | |
download | mdadm-b959dcfcd0319d4311e67fa40ebb407605efc9d9.tar.xz mdadm-b959dcfcd0319d4311e67fa40ebb407605efc9d9.zip |
Merging upstream version 4.2+20230508.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'lib.c')
-rw-r--r-- | lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -313,7 +313,7 @@ char *map_dev_preferred(int major, int minor, int create, for (p = devlist; p; p = p->next) if (p->major == major && p->minor == minor) { - if (strncmp(p->name, "/dev/md/",8) == 0 || + if (strncmp(p->name, DEV_MD_DIR, DEV_MD_DIR_LEN) == 0 || (prefer && strstr(p->name, prefer))) { if (preferred == NULL || strlen(p->name) < strlen(preferred)) @@ -570,7 +570,7 @@ void free_line(char *line) * * Return: 0 on success, 1 otherwise. */ -int parse_num(int *dest, char *num) +int parse_num(int *dest, const char *num) { char *c = NULL; long temp; |