data_dirs = dirs;
- while (data_dirs && (data_dir = *data_dirs) && fd < 0)
+ while (data_dirs && (data_dir = *data_dirs) && fd == -1)
{
gchar *candidate_file, *sub_dir;
candidate_file = (gchar *) file;
sub_dir = g_strdup ("");
- while (candidate_file != NULL && fd < 0)
+ while (candidate_file != NULL && fd == -1)
{
gchar *p;
fd = g_open (path, O_RDONLY, 0);
- if (fd < 0)
+ if (fd == -1)
{
g_free (path);
path = NULL;
data_dirs++;
}
- if (fd < 0)
+ if (fd == -1)
{
g_set_error_literal (error, G_KEY_FILE_ERROR,
G_KEY_FILE_ERROR_NOT_FOUND,
fd = g_open (file, O_RDONLY, 0);
- if (fd < 0)
+ if (fd == -1)
{
g_set_error_literal (error, G_FILE_ERROR,
g_file_error_from_errno (errno),
fd = find_file_in_data_dirs (file, data_dirs, &output_path,
&key_file_error);
- if (fd < 0)
+ if (fd == -1)
{
if (key_file_error)
g_propagate_error (error, key_file_error);