Browse code

ctl: removed unused function safe_write()

Daniel-Constantin Mierla authored on 25/10/2021 12:45:28
Showing 1 changed files
... ...
@@ -947,29 +947,6 @@ static void rpc_fault(rpc_ctx_t* ctx, int code, char* fmt, ...)
947 947
 }
948 948
 
949 949
 
950
-static inline int safe_write(FILE* f, char* fmt, ...)
951
-{
952
-	va_list ap;
953
-	
954
-	if (!*fmt) return 0;
955
-	va_start(ap, fmt);
956
-
957
- retry:
958
-	     /* First line containing code and reason phrase */
959
-	if (vfprintf(f, fmt, ap) <= 0) {
960
-		ERR("fifo write error: %s\n", strerror(errno));
961
-		if ((errno == EINTR) || (errno == EAGAIN) || (errno == EWOULDBLOCK)) {
962
-			goto retry;
963
-		}
964
-		va_end(ap);
965
-		return -1;
966
-	}
967
-	va_end(ap);
968
-	return 0;
969
-}
970
-
971
-
972
-
973 950
 inline static int build_iovec(rpc_ctx_t* ctx, struct iovec* v, int v_size) 
974 951
 {
975 952
 	struct text_chunk* p;