logo

badwolf

Minimalist and privacy-oriented WebKitGTK+ browser
commit: e5ca3b1e8bd68d3199d2874fbc505ee58b83f244
parent: e094bb79e56851ebf3f9140bd14df363be8921d8
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun, 10 Mar 2019 16:56:33 +0100

badwolf.c: replace POSIX/C calls to GLib wrapped ones

Diffstat:

Mbadwolf.c7+++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/badwolf.c b/badwolf.c @@ -2,7 +2,6 @@ // Copyright © 2019 Haelwenn (lanodan) Monnier <contact@hacktivis.me> // SPDX-License-Identifier: BSD-3-Clause -#include <stdio.h> /* fprintf() */ #include <gtk/gtk.h> #include <webkit2/webkit2.h> @@ -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);