diff --git a/src/files.c b/src/files.c index 12e8b181f878c325ad49d5a145437cfe7670fcce..d71c115f20c77a6ddc96c074f981cb58fcce7a90 100644 --- a/src/files.c +++ b/src/files.c @@ -1562,8 +1562,7 @@ int write_marked_file(const char *name, FILE *f_open, bool tmp, /* If the line at filebot is blank, treat it as the magicline and * hence the end of the file. Otherwise, add a magicline and treat * it as the end of the file. */ - added_magicline = (openfile->filebot->data[0] != '\0'); - if (added_magicline) + if ((added_magicline = (openfile->filebot->data[0] != '\0'))) new_magicline(); retval = write_file(name, f_open, tmp, append, TRUE); diff --git a/src/nano.c b/src/nano.c index 83d3d61fcd06a4aa0198c67ce422d8c37bb2790f..05279b1ed34fd35d6425104f9692621c33be5208 100644 --- a/src/nano.c +++ b/src/nano.c @@ -1492,11 +1492,11 @@ void do_output(char *output, size_t output_len, bool allow_cntrls) assert(openfile->current_x <= current_len); - charmove(&openfile->current->data[openfile->current_x + - char_buf_len], - &openfile->current->data[openfile->current_x], - current_len - openfile->current_x + char_buf_len); - strncpy(&openfile->current->data[openfile->current_x], char_buf, + charmove(openfile->current->data + openfile->current_x + + char_buf_len, openfile->current->data + + openfile->current_x, current_len - openfile->current_x + + char_buf_len); + strncpy(openfile->current->data + openfile->current_x, char_buf, char_buf_len); current_len += char_buf_len; openfile->totsize++; diff --git a/src/prompt.c b/src/prompt.c index e0e5d4f2ac2f910e37f6a3df37dbe9ef6dda46a2..6376a3f450405b8970fe58f5473e963758a50d67 100644 --- a/src/prompt.c +++ b/src/prompt.c @@ -312,10 +312,10 @@ void do_statusbar_output(char *output, size_t output_len, bool assert(statusbar_x <= answer_len); - charmove(&answer[statusbar_x + char_buf_len], - &answer[statusbar_x], answer_len - statusbar_x + + charmove(answer + statusbar_x + char_buf_len, + answer + statusbar_x, answer_len - statusbar_x + char_buf_len); - strncpy(&answer[statusbar_x], char_buf, char_buf_len); + strncpy(answer + statusbar_x, char_buf, char_buf_len); answer_len += char_buf_len; statusbar_x += char_buf_len;