Mercurial > hg > octave-jordi > gnulib-hg
annotate modules/fstrcmp @ 17896:29ead46d1cca
fstrcmp: don't assume strlen < INT_MAX
* lib/fstrcmp.c: Include stddef.h and stdint.h.
(uintptr_t): Remove, as we're now assuming stdint.
(OFFSET, EXTRA_CONTEXT_FIELDS, fstrcmp_bounded):
Prefer ptrdiff_t to int when the value could exceed INT_MAX
if the input string is long.
(fstrcmp_bounded): Check for size-calculation overflow. Prefer
uintptr_t to size_t when the underlying value is a pointer casted
to an unsigned integer. Avoid unnecessary 'buffer != NULL' test.
* modules/fstrcmp (Depends-on): Add stdint.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Sat, 07 Feb 2015 18:09:00 -0800 |
parents | 1f14c6dd175d |
children |
rev | line source |
---|---|
9151 | 1 Description: |
2 Fuzzy string comparison. | |
3 | |
4 Files: | |
5 lib/fstrcmp.h | |
6 lib/fstrcmp.c | |
7 | |
8 Depends-on: | |
9 diffseq | |
10 lock | |
11 tls | |
12 minmax | |
17896
29ead46d1cca
fstrcmp: don't assume strlen < INT_MAX
Paul Eggert <eggert@cs.ucla.edu>
parents:
17713
diff
changeset
|
13 stdint |
9151 | 14 xalloc |
15 | |
16 configure.ac: | |
17 | |
18 Makefile.am: | |
19 lib_SOURCES += fstrcmp.h fstrcmp.c | |
20 | |
21 Include: | |
22 "fstrcmp.h" | |
23 | |
24 License: | |
25 GPL | |
26 | |
27 Maintainer: | |
17713
1f14c6dd175d
Bruno Haible has stepped down as maintainer.
Paul Eggert <eggert@cs.ucla.edu>
parents:
9151
diff
changeset
|
28 all |