summaryrefslogtreecommitdiffstats
path: root/web/attachments/121781-nagiosplug-cvs-netutils-wrappers.diff
blob: de98a2619646d505600af57fd541323c57ccf13d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
diff -urN ./plugins/netutils.c ../foo/plugins/netutils.c
--- ./plugins/netutils.c	2005-02-18 14:59:29.000000000 +0100
+++ ../foo/plugins/netutils.c	2005-02-18 16:12:35.000000000 +0100
@@ -64,12 +64,8 @@
 process_tcp_request (const char *server_address, int server_port,
 	const char *send_buffer, char *recv_buffer, int recv_size)
 {
-	int result;
-
-	result = process_request (server_address, server_port,
-			IPPROTO_TCP, send_buffer, recv_buffer, recv_size);
-
-	return result;
+	return process_request (server_address, server_port, IPPROTO_TCP,
+	                        send_buffer, recv_buffer, recv_size);
 }
 
 
@@ -79,12 +75,8 @@
 process_udp_request (const char *server_address, int server_port,
 	const char *send_buffer, char *recv_buffer, int recv_size)
 {
-	int result;
-
-	result = process_request (server_address, server_port,
-			IPPROTO_UDP, send_buffer, recv_buffer, recv_size);
-
-	return result;
+	return process_request (server_address, server_port, IPPROTO_UDP,
+	                        send_buffer, recv_buffer, recv_size);
 }
 
 
@@ -195,11 +187,7 @@
 int
 my_tcp_connect (const char *host_name, int port, int *sd)
 {
-	int result;
-
-	result = my_connect (host_name, port, sd, IPPROTO_TCP);
-
-	return result;
+	return my_connect (host_name, port, sd, IPPROTO_TCP);
 }
 
 
@@ -207,11 +195,7 @@
 int
 my_udp_connect (const char *host_name, int port, int *sd)
 {
-	int result;
-
-	result = my_connect (host_name, port, sd, IPPROTO_UDP);
-
-	return result;
+	return my_connect (host_name, port, sd, IPPROTO_UDP);
 }