mirror of
https://github.com/novatiq/packages.git
synced 2026-04-30 15:38:40 +01:00
mmc-utils: update to latest git head
Remove already upstreamed patches, add another one from mailing-list. Signed-off-by: Michael Heimpold <mhei@heimpold.de>
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
From 3539243dcab7b84bb8a45e2c2da80e162284bffc Mon Sep 17 00:00:00 2001
|
||||
From: Michael Heimpold <mhei@heimpold.de>
|
||||
Date: Sat, 8 Dec 2018 10:43:01 +0100
|
||||
Subject: [PATCH] One further optimization of trimming routine
|
||||
|
||||
The last change to the trimming routine made it more efficient,
|
||||
however, we can even get rid of the memmove() as we leave the
|
||||
function with strdup() anyway.
|
||||
|
||||
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
|
||||
Reviewed-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
|
||||
---
|
||||
lsmmc.c | 5 ++---
|
||||
1 file changed, 2 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/lsmmc.c b/lsmmc.c
|
||||
index 06cc0b8..05d59e8 100644
|
||||
--- a/lsmmc.c
|
||||
+++ b/lsmmc.c
|
||||
@@ -393,10 +393,9 @@ char *read_file(char *name)
|
||||
start++;
|
||||
len--;
|
||||
}
|
||||
- memmove(line, start, len);
|
||||
- line[len] = '\0';
|
||||
|
||||
- return strdup(line);
|
||||
+ start[len] = '\0';
|
||||
+ return strdup(start);
|
||||
}
|
||||
|
||||
/* Hexadecimal string parsing functions */
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Reference in New Issue
Block a user