Sort includes and more cleanup and fixes in util/

This commit is contained in:
FRIGN
2014-11-13 19:54:28 +01:00
committed by sin
parent 0810c61154
commit 7d2683ddf2
48 changed files with 181 additions and 173 deletions

View File

@@ -11,14 +11,14 @@ apathmax(char **p, long *size)
{
errno = 0;
if((*size = pathconf("/", _PC_PATH_MAX)) == -1) {
if(errno == 0) {
if ((*size = pathconf("/", _PC_PATH_MAX)) == -1) {
if (errno == 0) {
*size = BUFSIZ;
} else {
eprintf("pathconf:");
}
}
if(!(*p = malloc(*size)))
if (!(*p = malloc(*size)))
eprintf("malloc:");
}