Mercurial > vim
comparison src/vim9cmds.c @ 27583:d4921b91542c v8.2.4318
patch 8.2.4318: various comment and indent mistakes, returning wrong zero
Commit: https://github.com/vim/vim/commit/54969f4ef5825205ecde09ea80f4087fc3b68e5d
Author: Bram Moolenaar <Bram@vim.org>
Date: Mon Feb 7 13:56:44 2022 +0000
patch 8.2.4318: various comment and indent mistakes, returning wrong zero
Problem: Various comment and indent mistakes, returning wrong zero.
Solution: Fix the mistakes. Return NULL instead of FAIL.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Mon, 07 Feb 2022 15:00:05 +0100 |
parents | 1aff400b819e |
children | 6f5c8493a238 |
comparison
equal
deleted
inserted
replaced
27582:de6c8e93b47f | 27583:d4921b91542c |
---|---|
1418 end = skip_regexp_ex(p + 1, *p, TRUE, &tofree, &dropped, NULL); | 1418 end = skip_regexp_ex(p + 1, *p, TRUE, &tofree, &dropped, NULL); |
1419 if (*end != *p) | 1419 if (*end != *p) |
1420 { | 1420 { |
1421 semsg(_(e_separator_mismatch_str), p); | 1421 semsg(_(e_separator_mismatch_str), p); |
1422 vim_free(tofree); | 1422 vim_free(tofree); |
1423 return FAIL; | 1423 return NULL; |
1424 } | 1424 } |
1425 if (tofree == NULL) | 1425 if (tofree == NULL) |
1426 len = (int)(end - (p + 1)); | 1426 len = (int)(end - (p + 1)); |
1427 else | 1427 else |
1428 len = (int)(end - tofree); | 1428 len = (int)(end - tofree); |
1429 pat = vim_strnsave(tofree == NULL ? p + 1 : tofree, len); | 1429 pat = vim_strnsave(tofree == NULL ? p + 1 : tofree, len); |
1430 vim_free(tofree); | 1430 vim_free(tofree); |
1431 p += len + 2 + dropped; | 1431 p += len + 2 + dropped; |
1432 if (pat == NULL) | 1432 if (pat == NULL) |
1433 return FAIL; | 1433 return NULL; |
1434 if (generate_PUSHS(cctx, &pat) == FAIL) | 1434 if (generate_PUSHS(cctx, &pat) == FAIL) |
1435 return FAIL; | 1435 return NULL; |
1436 | 1436 |
1437 if (generate_COMPARE(cctx, EXPR_MATCH, FALSE) == FAIL) | 1437 if (generate_COMPARE(cctx, EXPR_MATCH, FALSE) == FAIL) |
1438 return NULL; | 1438 return NULL; |
1439 | 1439 |
1440 scope->se_u.se_try.ts_catch_label = instr->ga_len; | 1440 scope->se_u.se_try.ts_catch_label = instr->ga_len; |