From: Andreas Schwab Date: Sat, 2 May 2009 11:32:42 +0000 (+0000) Subject: (record_conversion_result): Don't modify X-Git-Tag: emacs-pretest-23.0.94~133 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=409ea3a1dd530feabeb8f7f21dfd9c4aa2eb7a43;p=emacs.git (record_conversion_result): Don't modify Vlast_code_conversion_error for successful result. (alloc_destination): Don't clobber conversion result. (Bug#1650) --- diff --git a/src/ChangeLog b/src/ChangeLog index 72f050cb170..4ba1d7fae65 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,9 @@ +2009-05-02 Andreas Schwab + + * coding.c (record_conversion_result): Don't modify + Vlast_code_conversion_error for successful result. + (alloc_destination): Don't clobber conversion result. (Bug#1650) + 2009-05-01 Emanuele Giaquinta (tiny change) * charset.c (load_charset): Reformat X==Y==Z to (X==Y)==Z. diff --git a/src/coding.c b/src/coding.c index d374ca8b476..23690bc753b 100644 --- a/src/coding.c +++ b/src/coding.c @@ -992,6 +992,8 @@ record_conversion_result (struct coding_system *coding, case CODING_RESULT_INSUFFICIENT_MEM: Vlast_code_conversion_error = Qinsufficient_memory; break; + case CODING_RESULT_SUCCESS: + break; default: Vlast_code_conversion_error = intern ("Unknown error"); } @@ -1203,7 +1205,6 @@ alloc_destination (coding, nbytes, dst) } else coding_alloc_by_realloc (coding, nbytes); - record_conversion_result (coding, CODING_RESULT_SUCCESS); coding_set_destination (coding); dst = coding->destination + offset; return dst;