--- nsalibsemanage/src/direct_api.c 2009-01-13 08:45:35.000000000 -0500 +++ libsemanage-2.0.31/src/direct_api.c 2009-06-02 14:54:20.000000000 -0400 @@ -991,7 +991,7 @@ int retval = -1; char *data = NULL; - size_t data_len = 0; + ssize_t data_len = 0; int compressed = 0; int in_fd = -1; @@ -999,7 +999,7 @@ return -1; } - if ((data_len = map_file(in_fd, &data, &compressed)) == 0) { + if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) { goto cleanup; } @@ -1117,7 +1117,7 @@ { int retval = -1; char *data = NULL; - size_t data_len = 0; + ssize_t data_len = 0; int compressed = 0; int in_fd = -1; @@ -1125,7 +1125,7 @@ return -1; } - if ((data_len = map_file(in_fd, &data, &compressed)) == 0) { + if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) { goto cleanup; } @@ -1187,7 +1187,7 @@ { int retval = -1; char *data = NULL; - size_t data_len = 0; + ssize_t data_len = 0; int compressed = 0; int in_fd; @@ -1195,7 +1195,7 @@ return -1; } - if ((data_len = map_file(in_fd, &data, &compressed)) == 0) { + if ((data_len = map_file(in_fd, &data, &compressed)) <= 0) { goto cleanup; }