]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
libcollectdclient: Don't initialize a char with 0xF8. 3558/head
authorFlorian Forster <octo@google.com>
Tue, 1 Sep 2020 09:00:14 +0000 (11:00 +0200)
committerFlorian Forster <octo@google.com>
Tue, 1 Sep 2020 09:00:17 +0000 (11:00 +0200)
Fixes the following warning:

```
"src/libcollectdclient/network_parse.c", line 261: warning: initializer does not fit or is out of range: 248
```

src/libcollectdclient/network_parse.c

index 73ef02476fc5fde0009543b00dc0aeba355ab3a5..f74fd801dabba4124453c6c5a783e404c2c7420d 100644 (file)
@@ -258,7 +258,7 @@ static double ntohd(double val) /* {{{ */
       config = 4;
   }
 
-  if (memcmp((char[]){0, 0, 0, 0, 0, 0, 0xf8, 0x7f}, in.byte, 8) == 0) {
+  if (memcmp((uint8_t[]){0, 0, 0, 0, 0, 0, 0xf8, 0x7f}, in.byte, 8) == 0) {
     return NAN;
   } else if (config == 1) {
     return val;