bio: on a second thought, make it one line less
This commit is contained in:
parent
f9b6c4c5a3
commit
8fea0399b0
1 changed files with 2 additions and 3 deletions
|
@ -3,13 +3,12 @@
|
||||||
#include <bio.h>
|
#include <bio.h>
|
||||||
|
|
||||||
static char*
|
static char*
|
||||||
badd(char *p, int *np, char *data, int ndata, int delim, int nulldelim)
|
badd(char *oldp, int *np, char *data, int ndata, int delim, int nulldelim)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
char *oldp;
|
char *p;
|
||||||
|
|
||||||
n = *np;
|
n = *np;
|
||||||
oldp = p;
|
|
||||||
p = realloc(oldp, n+ndata+1);
|
p = realloc(oldp, n+ndata+1);
|
||||||
if(p){
|
if(p){
|
||||||
memmove(p+n, data, ndata);
|
memmove(p+n, data, ndata);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue