Style inquistion for util and some tools.

This commit is contained in:
Christoph Lohmann
2013-03-05 21:46:48 +01:00
parent 52d39e35c2
commit f8dc6883a3
15 changed files with 100 additions and 32 deletions

View File

@@ -3,18 +3,23 @@
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "../util.h"
void
apathmax(char **p, long *size)
{
errno = 0;
if((*size = pathconf(".", _PC_PATH_MAX)) == -1) {
if(errno == 0)
if(errno == 0) {
*size = BUFSIZ;
else
} else {
eprintf("pathconf:");
}
}
if(!(*p = malloc(*size)))
eprintf("malloc:");
}