From f7926b75fc36c189f47de8e7db47f1bd36f2d1d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Ketelaars?= Date: Sat, 19 Sep 2015 17:23:30 +0200 Subject: [PATCH] display_date() is only used one time, doesn't make sense to make it a function --- fiche.c | 7 +------ fiche.h | 1 - 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/fiche.c b/fiche.c index 8ee3dab..9435381 100644 --- a/fiche.c +++ b/fiche.c @@ -147,11 +147,6 @@ void perform_connection(int listen_socket) pthread_detach(thread_id); } -void display_date() -{ - info("%s\n", get_date()); -} - char *get_date() { time_t rawtime; @@ -216,7 +211,7 @@ void display_info(struct client_data data, char *slug, char *message) if (slug == NULL) info("%s\n", message); else info("Saved to: %s\n", slug); - display_date(); + info("%s\n", get_date()); info("Client: %s (%s)\n", data.ip_address, data.hostname); info("====================================\n"); } diff --git a/fiche.h b/fiche.h index 5dfcd4f..e43b168 100644 --- a/fiche.h +++ b/fiche.h @@ -81,7 +81,6 @@ int check_protocol(char *buffer); void bind_to_port(int listen_socket, struct sockaddr_in serveraddr); void error(char *error_code){perror(error_code); exit(1);} -void display_date(); void perform_connection(int listen_socket); void generate_url(char *buffer, char *slug, size_t slug_length, struct client_data data); void save_to_file(char *buffer, char *slug, struct client_data data);