From bb66ef1a030b7e2e2891f64296c6e0f8fa0fe950 Mon Sep 17 00:00:00 2001 From: Tim Schubert Date: Mon, 29 Oct 2018 10:44:02 +0100 Subject: [PATCH] Add documentation for report_error --- netcalc.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netcalc.c b/netcalc.c index 94b23d2..39da486 100644 --- a/netcalc.c +++ b/netcalc.c @@ -149,6 +149,10 @@ int parse(char *buf, size_t buflen, unsigned int *first, unsigned int *second, c return status; } +/// Prints a formatted error to stderr and a buffer +/// @param buf destination buffer +/// @param buflen length of buf +/// @param msg error message void report_error(char *buf, unsigned long buflen, char *msg) { fprintf(stderr, "%s\n", msg); memset(buf, 0, buflen);