projects
/
platform
/
upstream
/
udisks2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
774e835
)
simplify validate_and_escape_label()
author
Martin Pitt
<martin.pitt@ubuntu.com>
Sat, 6 Nov 2010 17:28:39 +0000
(13:28 -0400)
committer
Martin Pitt
<martin.pitt@ubuntu.com>
Sat, 6 Nov 2010 17:28:39 +0000
(13:28 -0400)
Cleanup from 3d42082
src/helpers/job-shared.h
patch
|
blob
|
history
diff --git
a/src/helpers/job-shared.h
b/src/helpers/job-shared.h
index
ae263f2
..
17cb546
100644
(file)
--- a/
src/helpers/job-shared.h
+++ b/
src/helpers/job-shared.h
@@
-208,16
+208,11
@@
validate_and_escape_label (char **label,
goto out;
}
- /* escape '"' */
+ /* escape '"'
and '\'
*/
s = g_string_new (*label);
for (n = 0; n < (int) s->len; n++)
{
- if (s->str[n] == '"')
- {
- g_string_insert_c (s, n, '\\');
- n++;
- }
- else if (s->str[n] == '\\')
+ if (s->str[n] == '"' || s->str[n] == '\\')
{
g_string_insert_c (s, n, '\\');
n++;