Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Zbigniew Jędrzejewski-Szmek
polkit
Commits
f479aece
Commit
f479aece
authored
Nov 22, 2007
by
David Zeuthen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid adding newline at the end of generated entry
parent
b555fb75
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
6 deletions
+1
-6
src/kit/kit-string.c
src/kit/kit-string.c
+1
-6
No files found.
src/kit/kit-string.c
View file @
f479aece
...
...
@@ -611,8 +611,7 @@ out:
* Takes an array of key/value pairs and generates a string
* <literal>"k1=v1:k2=v2:...:k_n=v_n"</literal> where
* <literal>k_i</literal> and <literal>v_i</literal> are percent
* encoded representations of the given key/value pairs. The string
* will have a newline (ASCII character 10) at end.
* encoded representations of the given key/value pairs.
*
* The string can later be parsed with kit_string_entry_parse() to get
* the exact same list of key/value pairs back.
...
...
@@ -661,10 +660,6 @@ kit_string_entry_createv (char *buf, size_t buf_size, const char *kv_pairs[])
m
+=
kit_string_percent_encode
(
buf
+
m
,
buf_size
-
m
>
0
?
buf_size
-
m
:
0
,
value
);
}
if
(
m
<
buf_size
)
buf
[
m
]
=
'\n'
;
m
++
;
out:
if
(
m
<
buf_size
)
buf
[
m
]
=
'\0'
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment