mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* file.c (BUFCHECK): use common bdiff.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23890 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
b861b2a6b2
commit
ae72efc541
1 changed files with 2 additions and 2 deletions
4
file.c
4
file.c
|
@ -2642,7 +2642,7 @@ ntfs_tail(const char *path)
|
|||
#endif
|
||||
|
||||
#define BUFCHECK(cond) do {\
|
||||
size_t bdiff = p - buf;\
|
||||
bdiff = p - buf;\
|
||||
if (cond) {\
|
||||
do {buflen *= 2;} while (cond);\
|
||||
rb_str_resize(result, buflen);\
|
||||
|
@ -2711,7 +2711,7 @@ file_expand_path(VALUE fname, VALUE dname, int abs_mode, VALUE result)
|
|||
{
|
||||
const char *s, *b;
|
||||
char *buf, *p, *pend, *root;
|
||||
size_t buflen, dirlen;
|
||||
size_t buflen, dirlen, bdiff;
|
||||
int tainted;
|
||||
rb_encoding *extenc = 0;
|
||||
|
||||
|
|
Loading…
Reference in a new issue