gavinchou commented on code in PR #15078:
URL: https://github.com/apache/doris/pull/15078#discussion_r1051522259


##########
thirdparty/patches/glog-0.4.0.patch:
##########
@@ -232,27 +232,29 @@ diff -uprN a/src/logging.cc b/src/logging.cc
  
 +  if ((file_ == NULL) && (!inited_) && (FLAGS_log_split_method == "size")) {
 +    CheckFileNumQuota();
-+    const char* filename = file_list_.back().name.c_str();
-+    int fd = open(filename, O_WRONLY | O_CREAT | O_APPEND, 
FLAGS_logfile_mode);
-+    if (fd != -1) {
++    if (!file_list_.empty()) {
++      const char* filename = file_list_.back().name.c_str();
++      int fd = open(filename, O_WRONLY | O_CREAT | O_APPEND, 
FLAGS_logfile_mode);
++      if (fd != -1) {
 +#ifdef HAVE_FCNTL
-+      // Mark the file close-on-exec. We don't really care if this fails
-+      fcntl(fd, F_SETFD, FD_CLOEXEC);
++        // Mark the file close-on-exec. We don't really care if this fails

Review Comment:
   Incorrect indention



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to