mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
trivial cleanup
This commit is contained in:
parent
99cfca8498
commit
7d1d43744a
2 changed files with 3 additions and 2 deletions
|
@ -369,7 +369,7 @@ void safe_report_exec_error(int err, const char *actual_cmd, const char *const *
|
|||
const char *const *envv) {
|
||||
switch (err) {
|
||||
case E2BIG: {
|
||||
char sz1[128], sz2[128];
|
||||
char sz1[128];
|
||||
|
||||
long arg_max = -1;
|
||||
|
||||
|
@ -388,6 +388,7 @@ void safe_report_exec_error(int err, const char *actual_cmd, const char *const *
|
|||
|
||||
if (arg_max > 0) {
|
||||
if (sz >= static_cast<unsigned long long>(arg_max)) {
|
||||
char sz2[128];
|
||||
format_size_safe(sz2, static_cast<unsigned long long>(arg_max));
|
||||
FLOGF_SAFE(exec,
|
||||
"Failed to execute process '%s': the size of argument and "
|
||||
|
|
|
@ -309,7 +309,7 @@ static size_t measure_run_from(const wchar_t *input, size_t start, size_t *out_e
|
|||
layout_cache_t &cache) {
|
||||
size_t width = 0;
|
||||
size_t idx = start;
|
||||
for (idx = start; !is_run_terminator(input[idx]); idx++) {
|
||||
for (; !is_run_terminator(input[idx]); idx++) {
|
||||
if (input[idx] == L'\x1B') {
|
||||
// This is the start of an escape code; we assume it has width 0.
|
||||
// -1 because we are going to increment in the loop.
|
||||
|
|
Loading…
Reference in a new issue