diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/awk.c | 3 | ||||
-rw-r--r-- | editors/patch.c | 4 | ||||
-rw-r--r-- | editors/vi.c | 2 |
3 files changed, 6 insertions, 3 deletions
diff --git a/editors/awk.c b/editors/awk.c index 1bdb9b924..5a504d034 100644 --- a/editors/awk.c +++ b/editors/awk.c | |||
@@ -2145,7 +2145,8 @@ static var *evaluate(node *op, var *res) | |||
2145 | X.rsm = newfile(R.s); | 2145 | X.rsm = newfile(R.s); |
2146 | if (! X.rsm->F) { | 2146 | if (! X.rsm->F) { |
2147 | if (opn == '|') { | 2147 | if (opn == '|') { |
2148 | if((X.rsm->F = popen(R.s, "w")) == NULL) | 2148 | X.rsm->F = popen(R.s, "w"); |
2149 | if (X.rsm->F == NULL) | ||
2149 | bb_perror_msg_and_die("popen"); | 2150 | bb_perror_msg_and_die("popen"); |
2150 | X.rsm->is_pipe = 1; | 2151 | X.rsm->is_pipe = 1; |
2151 | } else { | 2152 | } else { |
diff --git a/editors/patch.c b/editors/patch.c index 4d1425edc..11b2f2587 100644 --- a/editors/patch.c +++ b/editors/patch.c | |||
@@ -62,7 +62,9 @@ static char *extract_filename(char *line, int patch_level) | |||
62 | 62 | ||
63 | /* skip over (patch_level) number of leading directories */ | 63 | /* skip over (patch_level) number of leading directories */ |
64 | for (i = 0; i < patch_level; i++) { | 64 | for (i = 0; i < patch_level; i++) { |
65 | if(!(temp = strchr(filename_start_ptr, '/'))) break; | 65 | temp = strchr(filename_start_ptr, '/'); |
66 | if (!temp) | ||
67 | break; | ||
66 | filename_start_ptr = temp + 1; | 68 | filename_start_ptr = temp + 1; |
67 | } | 69 | } |
68 | 70 | ||
diff --git a/editors/vi.c b/editors/vi.c index 5bce4272f..a103776d2 100644 --- a/editors/vi.c +++ b/editors/vi.c | |||
@@ -447,7 +447,7 @@ static void edit_file(char * fn) | |||
447 | q = p; | 447 | q = p; |
448 | p = strchr(q,'\n'); | 448 | p = strchr(q,'\n'); |
449 | if (p) | 449 | if (p) |
450 | while(*p == '\n') | 450 | while (*p == '\n') |
451 | *p++ = '\0'; | 451 | *p++ = '\0'; |
452 | if (*q) | 452 | if (*q) |
453 | colon(q); | 453 | colon(q); |