Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
SUSE:SLE-12-SP1:Update
mdadm.5365
0170-util-Remove-unnecesary-NULL-pointer-checks...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0170-util-Remove-unnecesary-NULL-pointer-checks-when-call.patch of Package mdadm.5365
From 15d230f730f204917aa2a17fb352aa78f4ec9423 Mon Sep 17 00:00:00 2001 From: Jes Sorensen <Jes.Sorensen@redhat.com> Date: Mon, 7 Mar 2016 12:04:58 -0500 Subject: [PATCH 232/359] util: Remove unnecesary NULL pointer checks when calling sysfs_free() References: bsc#1081910 Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com> Signed-off-by: Coly Li <colyli@suse.de> --- util.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/util.c b/util.c index 09c2f6f..2bcb81f 100644 --- a/util.c +++ b/util.c @@ -1191,8 +1191,7 @@ struct supertype *super_by_fd(int fd, char **subarrayp) subarray = xstrdup(subarray); } strcpy(container, dev); - if (sra) - sysfs_free(sra); + sysfs_free(sra); sra = sysfs_read(-1, container, GET_VERSION); if (sra && sra->text_version[0]) verstr = sra->text_version; @@ -1203,8 +1202,7 @@ struct supertype *super_by_fd(int fd, char **subarrayp) for (i = 0; st == NULL && superlist[i] ; i++) st = superlist[i]->match_metadata_desc(verstr); - if (sra) - sysfs_free(sra); + sysfs_free(sra); if (st) { st->sb = NULL; if (subarrayp) -- 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