Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Step:FrontRunner
mdadm.14070
0096-maps-Simplify-implementation-of-map_name.p...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0096-maps-Simplify-implementation-of-map_name.patch of Package mdadm.14070
From 4a4379b054a72b3c4abd93dd6e1283d6aa992ee2 Mon Sep 17 00:00:00 2001 From: Jes Sorensen <jsorensen@fb.com> Date: Fri, 21 Apr 2017 12:11:21 -0400 Subject: [PATCH] maps: Simplify implementation of map_name() Git-commit: 4a4379b054a72b3c4abd93dd6e1283d6aa992ee2 Patch-mainline: mdadm-4.0+ References: bsc#1069165, bsc#1069167, bsc#1068030 Reported-by: NeilBrown <neilb@suse.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com> Signed-off-by: Coly Li <colyli@suse.de> --- maps.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/maps.c b/maps.c index 81f29c4..bb28ba6 100644 --- a/maps.c +++ b/maps.c @@ -165,11 +165,8 @@ char *map_num(mapping_t *map, int num) int map_name(mapping_t *map, char *name) { - while (map->name) { - if (strcmp(map->name, name)==0) - return map->num; + while (map->name && strcmp(map->name, name) != 0) map++; - } return map->num; } -- 2.13.6
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