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++)