From e2140ef531ba627b6ceede1ff3baae4548a57dea Mon Sep 17 00:00:00 2001 From: Wvader <34067397+wvader@users.noreply.github.com> Date: Wed, 2 Nov 2022 18:46:30 +0000 Subject: [PATCH] Remove unused func --- main.cpp | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/main.cpp b/main.cpp index 2cdb0cb..a85f8cf 100644 --- a/main.cpp +++ b/main.cpp @@ -49,22 +49,6 @@ static void readHostsFile() { aug_close(aug); } -static void printHostsText() { - struct augeas *aug; - int r; - char *s; - char *etc_hosts_fn = NULL; - - aug = aug_init(root, loadpath, AUG_NO_STDINC | AUG_NO_LOAD); - - r = aug_load_file(aug, "/etc/hosts"); - r = aug_preview(aug, "/files/etc/hosts/1", &s); - std::cout << s << std::endl; - - free(s); - aug_close(aug); -} - /// Get the tree of the /etc/hosts file printed in the console /// Implementation based on https://github.com/Nexenta/node-augeas/blob/756276c432cc9e506836800ac9d217bedbbef55c/libaugeas.cc#L784 @@ -73,7 +57,6 @@ static void readHostsTree() { struct augeas *aug; int r; FILE *out = tmpfile(); - char *etc_hosts_fn = NULL; aug = aug_init(root, loadpath, AUG_NO_STDINC | AUG_NO_LOAD); @@ -110,7 +93,6 @@ static void readHostsTree() { } - fclose(out); for (pos = stdBindList.begin();pos!=stdBindList.end();pos++)