aboutsummaryrefslogtreecommitdiff
path: root/src/preproc.c
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org>2016-06-20 12:46:03 +0300
committerSergey Poznyakoff <gray@gnu.org>2016-06-20 12:47:56 +0300
commit2ab621c7efbf9f519bfe0c3f7ac20ebe63361cd8 (patch)
tree6da91a24bc134729ce95a2fb9b0b2d380057d64c /src/preproc.c
parent59f9073082a0033a9a54ea27b2409bd087d63709 (diff)
downloadgrecs-2ab621c7efbf9f519bfe0c3f7ac20ebe63361cd8.tar.gz
grecs-2ab621c7efbf9f519bfe0c3f7ac20ebe63361cd8.tar.bz2
Fix grecs_include_path_count
* src/preproc.c (grecs_include_path_count): Return count.
Diffstat (limited to 'src/preproc.c')
-rw-r--r--src/preproc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/preproc.c b/src/preproc.c
index bdf4d40..8b59f21 100644
--- a/src/preproc.c
+++ b/src/preproc.c
@@ -244,16 +244,16 @@ static struct grecs_list *grecs_std_include_path;
size_t
grecs_include_path_count(int flag)
{
size_t count = 0;
if (flag & GRECS_STD_INCLUDE)
- count += grecs_std_include_path ? grecs_std_include_path->count : 0;
+ count += grecs_list_size(grecs_std_include_path);
if (flag & GRECS_USR_INCLUDE)
- count += grecs_usr_include_path ? grecs_usr_include_path->count : 0;
- return 0;
+ count += grecs_list_size(grecs_usr_include_path);
+ return count;
}
static int
foreach_dir(struct grecs_list *list, int flag,
int (*fun)(int, const char *, void *), void *data)
{

Return to:

Send suggestions and report system problems to the System administrator.