From 5f3eb34ea8107b66dd9e021aa528facebb206e6f Mon Sep 17 00:00:00 2001 From: edd255 Date: Sat, 19 Aug 2023 23:25:22 +0200 Subject: [PATCH] fix: applied clang-tidy fixes --- src/sh.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/sh.c b/src/sh.c index 92df5d9..5747a1a 100644 --- a/src/sh.c +++ b/src/sh.c @@ -1,5 +1,6 @@ #include "sh.h" +#include #include #include #include @@ -123,6 +124,7 @@ static inline void init_prompt(prompt_t* prompt) { || prompt->username == NULL) { fprintf(stderr, "sh: could not access hostname/username"); prompt->init_error = true; + return; } prompt->init_error = false; } @@ -174,7 +176,7 @@ void handle_cwd_error(char* file, int line, const char* fn) { case ENAMETOOLONG: { fprintf( stderr, - "%s:%i - %s: The size of the null-terminated absolute pathname string exceeds %s bytes", + "%s:%i - %s: The size of the null-terminated absolute pathname string exceeds %d bytes", file, line, fn,