Skip to content

Commit f25aa3c

Browse files
committed
one more conversion
1 parent f33f5ee commit f25aa3c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

ext/dba/libinifile/inifile.c

+6-6
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,9 @@ static bool inifile_truncate(inifile *dba, size_t size)
309309
/* {{{ inifile_find_group
310310
* if found pos_grp_start points to "[group_name]"
311311
*/
312-
static int inifile_find_group(inifile *dba, const key_type *key, size_t *pos_grp_start)
312+
static bool inifile_find_group(inifile *dba, const key_type *key, size_t *pos_grp_start)
313313
{
314-
int ret = FAILURE;
314+
bool found_group = false;
315315

316316
php_stream_flush(dba->fp);
317317
php_stream_seek(dba->fp, 0, SEEK_SET);
@@ -323,20 +323,20 @@ static int inifile_find_group(inifile *dba, const key_type *key, size_t *pos_grp
323323

324324
while (inifile_read(dba, &ln)) {
325325
if (inifile_key_cmp(&ln.key, key) != DIFFERENT) {
326-
ret = SUCCESS;
326+
found_group = true;
327327
break;
328328
}
329329
*pos_grp_start = php_stream_tell(dba->fp);
330330
}
331331
inifile_line_free(&ln);
332332
} else {
333333
*pos_grp_start = 0;
334-
ret = SUCCESS;
334+
found_group = true;
335335
}
336-
if (ret == FAILURE) {
336+
if (!found_group) {
337337
*pos_grp_start = php_stream_tell(dba->fp);
338338
}
339-
return ret;
339+
return found_group;
340340
}
341341
/* }}} */
342342

0 commit comments

Comments
 (0)