src/email.c:275:13: warning: implicit conversion loses integer precision: 'unsigned long' to 'int' [-Wshorten-64-to-32]
len = strlen(line);
~ ^~~~~~~~~~~~
while (42) {
/* 256 bytes ought to be enough for anybody ;-) */
char line[256 + 1]; /* line + '\0' */
- int len = 0;
errno = 0;
if (fgets(line, sizeof(line), this->socket) == NULL) {
break;
}
- len = strlen(line);
+ size_t len = strlen(line);
if ((line[len - 1] != '\n') && (line[len - 1] != '\r')) {
log_warn("collect: line too long (> %" PRIsz " characters): "
"'%s' (truncated)",
continue;
}
- line[len - 1] = 0;
+ line[len - 1] = '\0';
log_debug("collect: line = '%s'", line);