mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
C code bug fixes
- fix to buildin.c to prevent compiler from optimizing it out - fix to realpath.c to handle case where 'path' is NULL - fix to emacs.c (I think from dgk) - fix to file.c (I think from gsf) - fix to tail.c (I think from gsf) - fix to code setting the malloc init hook (for vmalloc) - changed memcpy to memmove in several places in sfio because src and dst might overlap - fixes to macros like FILE_defined to fix header file issues - fixes to expr.h to handle macro definition issue
This commit is contained in:
parent
0b36868c8c
commit
e8b3274a65
17 changed files with 62 additions and 36 deletions
|
|
@ -138,7 +138,7 @@ int n; /* current position in pool */
|
|||
else /* write failed, recover buffer then quit */
|
||||
{ if(w > 0)
|
||||
{ v -= w;
|
||||
memcpy(head->data,(head->data+w),v);
|
||||
memmove(head->data,(head->data+w),v);
|
||||
}
|
||||
head->next = head->data+v;
|
||||
goto done;
|
||||
|
|
@ -147,7 +147,7 @@ int n; /* current position in pool */
|
|||
|
||||
/* move data from head to f */
|
||||
if((head->data+k) != f->data )
|
||||
memcpy(f->data,(head->data+k),v);
|
||||
memmove(f->data,(head->data+k),v);
|
||||
f->next = f->data+v;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue