From e5ca3b1e8bd68d3199d2874fbc505ee58b83f244 Mon Sep 17 00:00:00 2001 From: "Haelwenn (lanodan) Monnier" Date: Sun, 10 Mar 2019 16:56:33 +0100 Subject: badwolf.c: replace POSIX/C calls to GLib wrapped ones --- badwolf.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/badwolf.c b/badwolf.c index 1d74601..7494986 100644 --- a/badwolf.c +++ b/badwolf.c @@ -2,7 +2,6 @@ // Copyright © 2019 Haelwenn (lanodan) Monnier // SPDX-License-Identifier: BSD-3-Clause -#include /* fprintf() */ #include #include @@ -72,7 +71,7 @@ static gboolean WebViewCb_web_process_terminated(WebKitWebView *webView, str_reason = "the web process terminated for an unknown reason."; } - fprintf(stderr, "BadWolf [signal: web-process-terminated]: %s\n", str_reason); + g_fprintf(stderr, "BadWolf [signal: web-process-terminated]: %s\n", str_reason); return FALSE; } @@ -231,7 +230,7 @@ static gboolean SearchEntryCb_stop__search(GtkSearchEntry *search, gpointer user struct Client *new_browser(struct Window *window, gchar *target_url, WebKitWebView *related_web_view) { - struct Client *browser = malloc(sizeof(struct Client)); + struct Client *browser = g_malloc(sizeof(struct Client)); browser->window = window; browser->box = gtk_box_new(GTK_ORIENTATION_VERTICAL, 0); @@ -344,7 +343,7 @@ void new_tabCb_clicked(GtkButton *new_tab, gpointer user_data) int main(int argc, char *argv[]) { - struct Window *window = malloc(sizeof(struct Client)); + struct Window *window = g_malloc(sizeof(struct Client)); gchar *target_url = NULL; gtk_init(&argc, &argv); -- cgit v1.3.1-23-gd82d