diff options
author | John Tytgat <joty@netsurf-browser.org> | 2008-05-25 15:51:30 +0000 |
---|---|---|
committer | John Tytgat <joty@netsurf-browser.org> | 2008-05-25 15:51:30 +0000 |
commit | 793d466edfa715e29b1d6141f42a7a837c4f446a (patch) | |
tree | 7c18cdfe932ec3b48218d7d8ea1668cf438cc24c /utils/utils.h | |
parent | e89c34657381b70fa129475577e1c51c754d6be1 (diff) | |
download | netsurf-793d466edfa715e29b1d6141f42a7a837c4f446a.tar.gz netsurf-793d466edfa715e29b1d6141f42a7a837c4f446a.tar.bz2 |
- introduction of SLEN()
- enforce result of url_normalize() being NULL on failure
- plug memory leak when url_normalize() fails
svn path=/trunk/netsurf/; revision=4200
Diffstat (limited to 'utils/utils.h')
-rw-r--r-- | utils/utils.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/utils/utils.h b/utils/utils.h index 8f3516e1d..4eb921e3f 100644 --- a/utils/utils.h +++ b/utils/utils.h @@ -40,6 +40,14 @@ #define max(x,y) (((x)>(y))?(x):(y)) #endif +/** + * Calculate length of constant C string. + * + * \param x a constant C string. + * \return the length of C string without its terminating NUL accounted. + */ +#define SLEN(x) (sizeof((x)) - 1) + enum query_response { QUERY_CONTINUE, QUERY_YES, |