Clean up and label includes
This commit is contained in:
parent
7b94a728ae
commit
374de790a7
1 changed files with 12 additions and 13 deletions
25
haggis.c
25
haggis.c
|
@ -32,23 +32,22 @@
|
|||
|
||||
#include "haggis.h"
|
||||
#include "mq.h"
|
||||
#include <assert.h>
|
||||
#include <errno.h>
|
||||
#include <libgen.h>
|
||||
|
||||
#include <assert.h> // assert
|
||||
#include <errno.h> // errno
|
||||
#include <libgen.h> // dirname
|
||||
#include <limits.h> // PATH_MAX
|
||||
#include <linux/limits.h>
|
||||
#include <stddef.h>
|
||||
#include <stddef.h> // size_t
|
||||
#include <stdint.h> // uint<x>_t
|
||||
#include <sys/unistd.h>
|
||||
|
||||
#if defined(__FreeBSD__) || defined(__DragonFly__)
|
||||
#include <sha.h>
|
||||
#include <sha256.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/types.h> // dev_t, makedev, major, minor
|
||||
#elif defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
#include <sha1.h>
|
||||
#include <sha2.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/types.h> // dev_t, makedev, major, minor
|
||||
#elif defined(__linux__)
|
||||
#include <sha1.h>
|
||||
#include <sha2.h>
|
||||
|
@ -58,9 +57,9 @@
|
|||
|
||||
#include <stdio.h> // fopen, fread, fwrite, FILE
|
||||
#include <stdlib.h> // free, malloc, calloc
|
||||
#include <string.h> // memcpy, strlen
|
||||
#include <unistd.h> // readlink
|
||||
#include <sys/stat.h> // stat
|
||||
#include <string.h> // memcpy, strnlen, strndup
|
||||
#include <unistd.h> // access, dirname, geteuid, readlink
|
||||
#include <sys/stat.h> // stat, lstat, mkdir, mknod
|
||||
|
||||
#include "haggis_private.h"
|
||||
|
||||
|
@ -381,7 +380,7 @@ void haggis_filename_deinit(haggis_filename *fname) {
|
|||
}
|
||||
|
||||
int haggis_load_filename(FILE *stream, haggis_filename *n) {
|
||||
u16 len;
|
||||
u16 len;
|
||||
char *name;
|
||||
|
||||
len.val = 0;
|
||||
|
@ -725,7 +724,7 @@ int mkdir_p(char *dir) {
|
|||
|
||||
int haggis_extract_dev(haggis_node *node, char *basedir) {
|
||||
dev_t dev;
|
||||
mode_t mode;
|
||||
mode_t mode = 0;
|
||||
char *path;
|
||||
int ret, major, minor;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue