Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
125d69cd
Commit
125d69cd
authored
Dec 18, 2003
by
Teodor Sigaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix signed char in comparison and check memory allocation
parent
ad8c09c2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
contrib/tsearch2/ispell/spell.c
contrib/tsearch2/ispell/spell.c
+5
-4
No files found.
contrib/tsearch2/ispell/spell.c
View file @
125d69cd
...
...
@@ -49,7 +49,7 @@ strnduplicate(char *s, int len) {
}
/* backward string compaire for suffix tree operations */
static
int
strbcmp
(
const
char
*
s1
,
const
char
*
s2
)
strbcmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
)
{
int
l1
=
strlen
(
s1
)
-
1
,
l2
=
strlen
(
s2
)
-
1
;
...
...
@@ -71,7 +71,7 @@ strbcmp(const char *s1, const char *s2)
return
0
;
}
static
int
strbncmp
(
const
char
*
s1
,
const
char
*
s2
,
size_t
count
)
strbncmp
(
const
unsigned
char
*
s1
,
const
unsigned
char
*
s2
,
size_t
count
)
{
int
l1
=
strlen
(
s1
)
-
1
,
l2
=
strlen
(
s2
)
-
1
,
...
...
@@ -536,9 +536,10 @@ mkANode(IspellDict *Conf, int low, int high, int level, int type) {
}
data
->
val
=
GETCHAR
(
Conf
->
Affix
+
i
,
level
,
type
);
if
(
Conf
->
Affix
[
i
].
replen
==
level
+
1
)
{
/* affix stopped */
if
(
!
data
->
naff
)
if
(
!
data
->
naff
)
{
data
->
aff
=
(
AFFIX
**
)
malloc
(
sizeof
(
AFFIX
*
)
*
(
high
-
i
+
1
));
MEMOUT
(
data
);
MEMOUT
(
data
->
aff
);
}
data
->
aff
[
data
->
naff
]
=
Conf
->
Affix
+
i
;
data
->
naff
++
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment