[balsa/gtk3] Reduce scope of variables
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Reduce scope of variables
- Date: Sun, 22 Jul 2012 19:44:12 +0000 (UTC)
commit dd1ed10e3590b87d3542b0a184b798649c8d00d9
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 22 15:35:22 2012 -0400
Reduce scope of variables
* src/balsa-mime-widget.c (balsa_mime_widget_new_unknown):
reduce scope of variables.
ChangeLog | 5 +++++
src/balsa-mime-widget.c | 5 +++--
2 files changed, 8 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index d945b17..3acee68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-22 Peter Bloomfield
+ * src/balsa-mime-widget.c (balsa_mime_widget_new_unknown):
+ reduce scope of variables.
+
+2012-07-22 Peter Bloomfield
+
* src/balsa-index.c (pipe_out_watch): reduce scope of variable.
2012-07-22 Peter Bloomfield
diff --git a/src/balsa-mime-widget.c b/src/balsa-mime-widget.c
index 647aafc..e62b0fe 100644
--- a/src/balsa-mime-widget.c
+++ b/src/balsa-mime-widget.c
@@ -250,9 +250,7 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
g_ascii_strcasecmp(content_type, "application/octet-stream") == 0)
&& LIBBALSA_IS_MAILBOX_LOCAL(mime_body->message->mailbox)) {
GError *err = NULL;
- ssize_t length = 1024 /* g_mime_stream_length(stream) */ ;
gpointer buffer;
- ssize_t size;
GMimeStream *stream =
libbalsa_message_body_get_stream(mime_body, &err);
if(!stream) {
@@ -262,6 +260,9 @@ balsa_mime_widget_new_unknown(BalsaMessage * bm,
g_clear_error(&err);
use_content_type = g_strdup(content_type);
} else {
+ ssize_t length = 1024 /* g_mime_stream_length(stream) */ ;
+ ssize_t size;
+
buffer = g_malloc(length);
libbalsa_mime_stream_shared_lock(stream);
size = g_mime_stream_read(stream, buffer, length);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]