Manage_ro(): Check pointer rather than dereferencing it

Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: NeilBrown <neilb@suse.de>
This commit is contained in:
Jes Sorensen 2011-11-03 08:09:41 +11:00 committed by NeilBrown
parent 29b59ca5c3
commit 1471b8b14b
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ int Manage_ro(char *devname, int fd, int readonly)
sysfs_set_str(mdi, NULL, "metadata_version", vers);
cp = strchr(vers+10, '/');
if (*cp)
if (cp)
*cp = 0;
ping_monitor(vers+10);
if (mdi->array.level <= 0)