diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-09-08 10:37:00 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-09-08 10:37:00 +0100 |
commit | 5e6b049763a7c72e179c9f6446856031a68dba26 (patch) | |
tree | 283c3e6e11282269adb131f038f925c6afbed638 /camel/providers/imapx | |
parent | 0493f925e7d2e5a3db6297464c997c0e4ba3ea78 (diff) | |
download | evolution-data-server-5e6b049763a7c72e179c9f6446856031a68dba26.tar.gz |
Remove redundant 'tokenptr' field from CamelIMAPXStream
It never differs from tokenbuf, so just use that.
Diffstat (limited to 'camel/providers/imapx')
-rw-r--r-- | camel/providers/imapx/camel-imapx-stream.c | 18 | ||||
-rw-r--r-- | camel/providers/imapx/camel-imapx-stream.h | 2 |
2 files changed, 10 insertions, 10 deletions
diff --git a/camel/providers/imapx/camel-imapx-stream.c b/camel/providers/imapx/camel-imapx-stream.c index 58e91917d..905c5a116 100644 --- a/camel/providers/imapx/camel-imapx-stream.c +++ b/camel/providers/imapx/camel-imapx-stream.c @@ -208,7 +208,7 @@ camel_imapx_stream_init (CamelIMAPXStream *is) { /* +1 is room for appending a 0 if we need to for a token */ is->ptr = is->end = is->buf = g_malloc(CAMEL_IMAPX_STREAM_SIZE+1); - is->tokenptr = is->tokenbuf = g_malloc(CAMEL_IMAPX_STREAM_SIZE+1); + is->tokenbuf = g_malloc(CAMEL_IMAPX_STREAM_SIZE+1); } /** @@ -323,7 +323,7 @@ camel_imapx_stream_astring(CamelIMAPXStream *is, guchar **data, GError **error) io(printf("astring too long\n")); return IMAPX_TOK_PROTOCOL; } - p = is->tokenptr; + p = is->tokenbuf; camel_imapx_stream_set_literal(is, len); do { ret = camel_imapx_stream_getl(is, &start, &inlen); @@ -333,7 +333,7 @@ camel_imapx_stream_astring(CamelIMAPXStream *is, guchar **data, GError **error) p += inlen; } while (ret > 0); *p = 0; - *data = is->tokenptr; + *data = is->tokenbuf; return 0; case IMAPX_TOK_ERROR: /* wont get unless no exception hanlder*/ @@ -362,7 +362,7 @@ camel_imapx_stream_nstring(CamelIMAPXStream *is, guchar **data, GError **error) g_set_error (error, CAMEL_IMAPX_ERROR, 1, "nstring: literal too long"); return IMAPX_TOK_PROTOCOL; } - p = is->tokenptr; + p = is->tokenbuf; camel_imapx_stream_set_literal(is, len); do { ret = camel_imapx_stream_getl(is, &start, &inlen); @@ -372,7 +372,7 @@ camel_imapx_stream_nstring(CamelIMAPXStream *is, guchar **data, GError **error) p += inlen; } while (ret > 0); *p = 0; - *data = is->tokenptr; + *data = is->tokenbuf; return 0; case IMAPX_TOK_TOKEN: p = *data; @@ -569,8 +569,8 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError e = is->end; } } else if (c == '"') { - o = is->tokenptr; - oe = is->tokenptr + CAMEL_IMAPX_STREAM_TOKEN - 1; + o = is->tokenbuf; + oe = is->tokenbuf + CAMEL_IMAPX_STREAM_TOKEN - 1; while (1) { while (p < e) { c = *p++; @@ -612,8 +612,8 @@ camel_imapx_stream_token(CamelIMAPXStream *is, guchar **data, guint *len, GError e = is->end; } } else { - o = is->tokenptr; - oe = is->tokenptr + CAMEL_IMAPX_STREAM_TOKEN - 1; + o = is->tokenbuf; + oe = is->tokenbuf + CAMEL_IMAPX_STREAM_TOKEN - 1; digits = isdigit(c); *o++ = c; while (1) { diff --git a/camel/providers/imapx/camel-imapx-stream.h b/camel/providers/imapx/camel-imapx-stream.h index 33555bbc0..334ed7e1e 100644 --- a/camel/providers/imapx/camel-imapx-stream.h +++ b/camel/providers/imapx/camel-imapx-stream.h @@ -73,7 +73,7 @@ struct _CamelIMAPXStream { guchar *unget_token; guint unget_len; - guchar *tokenbuf, *tokenptr; + guchar *tokenbuf; }; struct _CamelIMAPXStreamClass { |