summaryrefslogtreecommitdiff
path: root/hald/linux2
diff options
context:
space:
mode:
authorDanny Kukawka <danny.kukawka@web.de>2006-05-10 12:28:32 +0000
committerDanny Kukawka <danny.kukawka@web.de>2006-05-10 12:28:32 +0000
commit219477b7e162aeee5a2a1a370e82391c81642c67 (patch)
tree2db7d770e0b8f45ee6f2e6cda1c57856a6f23c6c /hald/linux2
parentfe8d524e0cfb7818112abceb73de45f3a8e86ddb (diff)
removed unneeded code and validate the returned string directly.
validate the returned string and not the original, which we duplicated for return.
Diffstat (limited to 'hald/linux2')
-rw-r--r--hald/linux2/probing/probe-volume.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/hald/linux2/probing/probe-volume.c b/hald/linux2/probing/probe-volume.c
index 2a13660d..fda361dd 100644
--- a/hald/linux2/probing/probe-volume.c
+++ b/hald/linux2/probing/probe-volume.c
@@ -66,14 +66,13 @@ strdup_valid_utf8 (const char *str)
{
char *endchar;
char *newstr;
- char *s;
if (str == NULL)
return NULL;
newstr = g_strdup (str);
- s = newstr;
- while (!g_utf8_validate (s, -1, (const char **) &endchar)) {
+
+ while (!g_utf8_validate (newstr, -1, (const char **) &endchar)) {
*endchar = '_';
}