diff options
badwolf.c: replace POSIX/C calls to GLib wrapped ones
1 files changed, 3 insertions, 4 deletions
| -rw-r--r-- | badwolf.c | 7 |
@@ -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); |