mirror of https://github.com/RT-Thread/rt-thread
Merge pull request #4531 from whj4674672/pipe
pipe name depend on RT_NAME_MAX
This commit is contained in:
commit
9cf0720b68
|
@ -531,8 +531,8 @@ int rt_pipe_delete(const char *name)
|
||||||
int pipe(int fildes[2])
|
int pipe(int fildes[2])
|
||||||
{
|
{
|
||||||
rt_pipe_t *pipe;
|
rt_pipe_t *pipe;
|
||||||
char dname[8];
|
char dname[RT_NAME_MAX];
|
||||||
char dev_name[32];
|
char dev_name[RT_NAME_MAX * 4];
|
||||||
static int pipeno = 0;
|
static int pipeno = 0;
|
||||||
|
|
||||||
rt_snprintf(dname, sizeof(dname), "pipe%d", pipeno++);
|
rt_snprintf(dname, sizeof(dname), "pipe%d", pipeno++);
|
||||||
|
|
Loading…
Reference in New Issue