mdadm: modify the variable used in the set_bitmap_value()
PATCH 1/1 mdadm: modify the variable used in the set_bitmap_value()
The function set_bitmap_value() argument is val, and optarg is a global variable. To ensure the function's independence, modify optarg to val.
Signed-off-by Wu Guanghao <[email protected]>
--- mdadm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
mdadm.c +1 -1
@@ -46,7 +46,7 @@ static mdadm_status_t set_bitmap_value(struct shape *s, struct context *c, charreturn MDADM_STATUS_ERROR ; } -if (strcmp (optarg,STR_COMMON_NONE ) ==0 ) { +if (strcmp (val,STR_COMMON_NONE ) ==0 ) { s->btype = BitmapNone;return MDADM_STATUS_SUCCESS ; }
Signature · 1 line
2.45.2