File: fix-nut-integer-sizes

package info (click to toggle)
collectd 5.12.0-14
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 9,424 kB
  • sloc: ansic: 120,843; perl: 20,684; php: 3,007; makefile: 2,423; java: 1,713; javascript: 920; python: 892; sh: 781; cpp: 638; yacc: 231; sql: 198; lex: 146; ruby: 49; xml: 44
file content (22 lines) | stat: -rw-r--r-- 584 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Index: collectd/src/nut.c
===================================================================
--- collectd.orig/src/nut.c
+++ collectd/src/nut.c
@@ -46,7 +46,7 @@ struct nut_ups_s {
   collectd_upsconn_t *conn;
   char *upsname;
   char *hostname;
-  int port;
+  uint16_t port;
   nut_ups_t *next;
 };
 
@@ -250,7 +250,7 @@ static int nut_read(user_data_t *user_da
   const char *query[3] = {"VAR", ups->upsname, NULL};
   unsigned int query_num = 2;
   char **answer;
-  unsigned int answer_num;
+  size_t answer_num;
   int status;
 
   /* (Re-)Connect if we have no connection */