This is an automated email from the ASF dual-hosted git repository.

dmeden pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git


The following commit(s) were added to refs/heads/master by this push:
     new 29c3e31c60 Coverity: Fix fox CID-1550411 (#11868)
29c3e31c60 is described below

commit 29c3e31c6020906adc212030ff37a05860cbac6d
Author: Damian Meden <[email protected]>
AuthorDate: Tue Nov 26 13:29:27 2024 +0100

    Coverity: Fix fox CID-1550411 (#11868)
---
 include/tscore/ink_file.h | 9 +++++----
 src/tscore/ink_file.cc    | 2 +-
 2 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/include/tscore/ink_file.h b/include/tscore/ink_file.h
index 32da7b663f..d2fa88fb14 100644
--- a/include/tscore/ink_file.h
+++ b/include/tscore/ink_file.h
@@ -34,6 +34,7 @@
 #include "tscore/ink_platform.h"
 
 #include <cstdio>
+#include <cstdint>
 #include <sys/types.h>
 #include <dirent.h>
 #include <stdint.h>
@@ -84,10 +85,10 @@ inline constexpr mode_t DEFAULT_OPEN_MODE{0644};
 
 int safe_open(char const *path, int oflag = O_RDWR | O_NDELAY | O_CREAT, 
mode_t mode = DEFAULT_OPEN_MODE);
 
-int ink_fputln(FILE *stream, const char *s);
-int ink_file_fd_readline(int fd, int bufsize, char *buf);
-int ink_file_fd_writestring(int fd, const char *buf);
-int ink_filepath_merge(char *buf, int bufsz, const char *rootpath, const char 
*addpath, int flags = INK_FILEPATH_TRUENAME);
+std::int64_t ink_fputln(FILE *stream, const char *s);
+int          ink_file_fd_readline(int fd, int bufsize, char *buf);
+int          ink_file_fd_writestring(int fd, const char *buf);
+int          ink_filepath_merge(char *buf, int bufsz, const char *rootpath, 
const char *addpath, int flags = INK_FILEPATH_TRUENAME);
 /**
  Add addpath to the rootpath prepending slash if rootpath
  is not nullptr and doesn't end with the slash already and put the
diff --git a/src/tscore/ink_file.cc b/src/tscore/ink_file.cc
index 285ae3df0e..e2be7e3416 100644
--- a/src/tscore/ink_file.cc
+++ b/src/tscore/ink_file.cc
@@ -57,7 +57,7 @@ safe_open(char const *path, int oflag, mode_t mode)
   return r;
 }
 
-int
+std::int64_t
 ink_fputln(FILE *stream, const char *s)
 {
   if (stream && s) {

Reply via email to