Fix compilation for CentOS

This commit is contained in:
François Grisez 2014-09-10 09:35:51 +02:00
parent 8c3e6f77cb
commit 112b93a790
2 changed files with 4 additions and 2 deletions

View file

@ -703,7 +703,9 @@ char *lp_config_read_relative_file(const LpConfig *lpconfig, const char *filenam
FILE *file = fopen(filepath, "r");
if(file != NULL) {
result = ms_new0(char, MAX_LEN);
fgets(result, MAX_LEN, file);
if(fgets(result, MAX_LEN, file) == NULL) {
ms_error("%s could not be loaded", filepath);
}
fclose(file);
} else {
ms_error("Could not open %s for read", filepath);

@ -1 +1 @@
Subproject commit b83b82d67692b5a93de5194c3503dc61828d4051
Subproject commit a87216d8e30ec6723774b1236c1eba6525568925