Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP5:Update
mdadm.5365
0169-Manage-Remove-unnecessary-NULL-pointer-che...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0169-Manage-Remove-unnecessary-NULL-pointer-checks.patch of Package mdadm.5365
From 6e8d27e77eb3414eb3c947cbd8820b37c4077e61 Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@redhat.com> Date: Mon, 7 Mar 2016 11:54:33 -0500 Subject: [PATCH 231/359] Manage: Remove unnecessary NULL pointer checks References: bsc#1081910 sysfs_free() handles NULL pointers, so remove superfluous NULL pointer checks before calling it. Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- Manage.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/Manage.c b/Manage.c index eae96e1..414373f 100644 --- a/Manage.c +++ b/Manage.c @@ -119,8 +119,7 @@ int Manage_ro(char *devname, int fd, int readonly) } out: #ifndef MDASSEMBLE - if (mdi) - sysfs_free(mdi); + sysfs_free(mdi); #endif return rv; } @@ -516,8 +515,7 @@ done: map_remove(&map, devnm); map_unlock(&map); out: - if (mdi) - sysfs_free(mdi); + sysfs_free(mdi); return rv; } @@ -1164,8 +1162,7 @@ int Manage_remove(struct supertype *tst, int fd, struct mddev_dev *dv, "state", "remove"); else err = -1; - if (sra) - sysfs_free(sra); + sysfs_free(sra); } } if (err) { -- 2.16.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor