]> git.wh0rd.org Git - nano.git/commitdiff
cosmetic fixes
authorDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 5 Nov 2005 04:59:00 +0000 (04:59 +0000)
committerDavid Lawrence Ramsey <pooka109@gmail.com>
Sat, 5 Nov 2005 04:59:00 +0000 (04:59 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3088 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

src/files.c
src/nano.c
src/prompt.c

index 12e8b181f878c325ad49d5a145437cfe7670fcce..d71c115f20c77a6ddc96c074f981cb58fcce7a90 100644 (file)
@@ -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);
index 83d3d61fcd06a4aa0198c67ce422d8c37bb2790f..05279b1ed34fd35d6425104f9692621c33be5208 100644 (file)
@@ -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++;
index e0e5d4f2ac2f910e37f6a3df37dbe9ef6dda46a2..6376a3f450405b8970fe58f5473e963758a50d67 100644 (file)
@@ -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;