[geany/geany-plugins] e05f1d: GeniusPaste: Fix misuse of g_strlcat() and simplify the code
Matthew Brush
git-noreply at xxxxx
Sun Jul 8 21:28:23 UTC 2012
Branch: refs/heads/1.22_release
Author: Matthew Brush <matt at geany.org>
Committer: Colomban Wendling <ban at herbesfolles.org>
Date: Sun, 08 Jul 2012 21:28:23
Commit: e05f1d6624db0deae08d4300630338910ba3c47e
https://github.com/geany/geany-plugins/commit/e05f1d6624db0deae08d4300630338910ba3c47e
Log Message:
-----------
GeniusPaste: Fix misuse of g_strlcat() and simplify the code
Modified Paths:
--------------
geniuspaste/src/geniuspaste.c
Modified: geniuspaste/src/geniuspaste.c
6 files changed, 2 insertions(+), 4 deletions(-)
===================================================================
@@ -377,10 +377,8 @@ static void paste(GeanyDocument * doc, const gchar * website)
* e.g. sprunge.us/xxxx?c
*/
gchar *ft_tmp = g_ascii_strdown(f_type, -1);
- p_url[strlen(p_url) - 1] = '\0';
- temp_body = g_strdup_printf("?%s", ft_tmp);
- g_strlcat(p_url + 1, temp_body, -1);
- p_url = g_strstrip(p_url);
+ temp_body = g_strstrip(p_url);
+ p_url = g_strdup_printf("%s?%s", temp_body, ft_tmp);
g_free(temp_body);
g_free(ft_tmp);
}
@@ Diff output truncated at 100000 characters. @@
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: TBD).
More information about the Plugins-Commits
mailing list