some tweaks to these changes

pull/398/head
Timothy Stack 8 years ago
parent e286534cfc
commit d799cc227e

@ -3013,7 +3013,7 @@ int main(int argc, char *argv[])
while (los != NULL &&
los->list_value_for_overlay(*tc, y, al)) {
if (write(STDOUT_FILENO, line.c_str(),
line.length()) == -1 or
line.length()) == -1 ||
write(STDOUT_FILENO, "\n", 1) == -1) {
perror("write to STDOUT");
}
@ -3028,7 +3028,7 @@ int main(int argc, char *argv[])
struct line_range lr = find_string_attr_range(
al.get_attrs(), &textview_curses::SA_ORIGINAL_LINE);
if (write(STDOUT_FILENO, lr.substr(al.get_string()),
lr.sublen(al.get_string())) == -1 or
lr.sublen(al.get_string())) == -1 ||
write(STDOUT_FILENO, "\n", 1) == -1) {
perror("write to STDOUT");
}
@ -3087,7 +3087,7 @@ int main(int argc, char *argv[])
++line_iter) {
lf->read_line(line_iter, str);
if (write(STDOUT_FILENO, str.c_str(), str.size()) == -1 or
if (write(STDOUT_FILENO, str.c_str(), str.size()) == -1 ||
write(STDOUT_FILENO, "\n", 1) == -1) {
perror("write to STDOUT");
}

@ -64,7 +64,7 @@ static string remaining_args(const string &cmdline,
require(index > 0);
for (unsigned int lpc = 0; lpc < index; lpc++) {
for (size_t lpc = 0; lpc < index; lpc++) {
start_pos += args[lpc].length();
}
@ -571,7 +571,7 @@ static string com_save_to(exec_context &ec, string cmdline, vector<string> &args
dos.list_value_for_overlay(lnav_data.ld_views[LNV_DB], vis_line_t(0), header_line);
fputs(header_line.get_string().c_str(), outfile);
fputc('\n', outfile);
for (unsigned int lpc = 0; lpc < dls.text_line_count(); lpc++) {
for (size_t lpc = 0; lpc < dls.text_line_count(); lpc++) {
string line;
dls.text_value_for_line(lnav_data.ld_views[LNV_DB], lpc, line, true);

@ -1065,8 +1065,8 @@ public:
json_log_field jfe_type;
intern_string_t jfe_value;
std::string jfe_default_value;
unsigned long long jfe_min_width;
unsigned long long jfe_max_width;
long long jfe_min_width;
long long jfe_max_width;
align_t jfe_align;
overflow_t jfe_overflow;
std::string jfe_ts_format;

@ -102,11 +102,9 @@ public:
this->ptp_search.c_str(),
this->ptp_search.size());
if (asprintf(this->ptp_token_header.out(),
"X-Papertrail-Token: %s",
this->ptp_api_key) == -1) {
perror("Failed to allocate X-Papertrail-Token string");
}
log_perror(asprintf(this->ptp_token_header.out(),
"X-Papertrail-Token: %s",
this->ptp_api_key));
this->ptp_header_list = curl_slist_append(this->ptp_header_list,
this->ptp_token_header.in());
@ -142,12 +140,10 @@ public:
"max_time=%ld&",
this->ptp_max_time);
}
if (asprintf(this->ptp_url.out(),
"%sq=%s",
base_url,
this->ptp_quoted_search.in()) == -1) {
perror("Failed to allocate ptp_url");
}
log_perror(asprintf(this->ptp_url.out(),
"%sq=%s",
base_url,
this->ptp_quoted_search.in()));
curl_easy_setopt(this->cr_handle, CURLOPT_URL, this->ptp_url.in());
};

@ -38,6 +38,7 @@
#include <string.h>
#include <ctype.h>
#include <time.h>
#include <inttypes.h>
#include <sys/types.h>
#include <arpa/inet.h>
@ -381,10 +382,10 @@ inline bool ptime_i(struct exttm *dst, const char *str, off_t &off_inout, ssize_
inline void ftime_i(char *dst, off_t &off_inout, ssize_t len, const struct exttm &tm)
{
time_t t = tm2sec(&tm.et_tm);
int64_t t = tm2sec(&tm.et_tm);
t += tm.et_nsec / 1000000;
snprintf(&dst[off_inout], len - off_inout, "%ld", t);
snprintf(&dst[off_inout], len - off_inout, "%" PRId64, t);
off_inout = strlen(dst);
}

@ -219,7 +219,7 @@ bool relative_time::parse(const char *str, size_t len, struct parse_error &pe_ou
string numstr = pi.get_substr(pc[0]);
if (sscanf(numstr.c_str(), "%ld", &number) != 1) {
if (sscanf(numstr.c_str(), "%" PRId64, &number) != 1) {
pe_out.pe_msg = "Invalid number: " + numstr;
return false;
}

@ -76,10 +76,8 @@ public:
default:
log_error("%s:curl failure -- %ld %s",
this->cr_name.c_str(), result, curl_easy_strerror(result));
if (write(this->ul_fd, this->cr_error_buffer,
strlen(this->cr_error_buffer)) == -1) {
perror("curl failure: write failure");
}
log_perror(write(this->ul_fd, this->cr_error_buffer,
strlen(this->cr_error_buffer)));
return -1;
}

@ -284,7 +284,7 @@ struct json_path_handler : public json_path_handler_base {
return *this;
};
json_path_handler &for_field(unsigned long long *field) {
json_path_handler &for_field(long long *field) {
this->add_cb(yajlpp_static_number);
this->jph_simple_offset = field;
this->jph_validator = yajlpp_validator_for_int;

@ -100,7 +100,6 @@ Caused by: java.lang.ClassNotFoundException: javax.el.StaticFieldELResolver
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1720)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571)
... 33 common frames omitted
@version: 1
logger_name: org.apache.jasper.runtime.JspFactoryImpl
thread_name: http-bio-0.0.0.0-8081-exec-198

Loading…
Cancel
Save