apathmax
This commit is contained in:
@@ -1,6 +1,4 @@
|
||||
/* See LICENSE file for copyright and license details. */
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include "../util.h"
|
||||
|
||||
@@ -10,10 +8,7 @@ agetcwd(void)
|
||||
char *buf;
|
||||
long size;
|
||||
|
||||
if((size = pathconf(".", _PC_PATH_MAX)) == -1)
|
||||
size = BUFSIZ;
|
||||
if(!(buf = malloc(size)))
|
||||
eprintf("malloc:");
|
||||
apathmax(&buf, &size);
|
||||
if(!getcwd(buf, size))
|
||||
eprintf("getcwd:");
|
||||
return buf;
|
||||
|
Reference in New Issue
Block a user