struct stat st;
char *source = NULL;
size_t size;
- int result;
bool is_pch;
size_t path_len = strlen(path);
struct file_hash *h;
if (!is_pch) { /* else: the file has already been hashed. */
+ int result;
+
if (st.st_size > 0) {
if (!read_file(path, st.st_size, &source, &size)) {
goto failure;
/*
- * Copyright (C) 2009-2011 Joel Rosdahl
+ * Copyright (C) 2009-2012 Joel Rosdahl
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the Free
{
char *data;
size_t size;
- int result;
if (is_precompiled_header(path)) {
if (hash_file(hash, path)) {
return HASH_SOURCE_CODE_ERROR;
}
} else {
+ int result;
+
if (!read_file(path, 0, &data, &size)) {
return HASH_SOURCE_CODE_ERROR;
}