[balsa/gtk3] Reduce scope of variable
- From: Peter Bloomfield <PeterB src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/gtk3] Reduce scope of variable
- Date: Sun, 22 Jul 2012 19:43:26 +0000 (UTC)
commit 1d787b7a7ed415201136235534daca6098ae8e63
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Jul 22 15:22:44 2012 -0400
Reduce scope of variable
* libbalsa/mailbox.c (libbalsa_mailbox_type_from_path): reduce
scope of variable.
ChangeLog | 5 +++++
libbalsa/mailbox.c | 3 ++-
2 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 4cdf85e..92d4c49 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2012-07-22 Peter Bloomfield
+ * libbalsa/mailbox.c (libbalsa_mailbox_type_from_path): reduce
+ scope of variable.
+
+2012-07-22 Peter Bloomfield
+
* libbalsa/libbalsa.c (libbalsa_guess_mail_spool),
(asn1time_to_string), (x509_get_part): reduce scope of
variables;
diff --git a/libbalsa/mailbox.c b/libbalsa/mailbox.c
index 45911fd..4186c1e 100644
--- a/libbalsa/mailbox.c
+++ b/libbalsa/mailbox.c
@@ -1103,7 +1103,6 @@ libbalsa_mailbox_type_from_path(const gchar * path)
*/
{
struct stat st;
- char tmp[_POSIX_PATH_MAX];
if(strncmp(path, "imap://", 7) == 0)
return LIBBALSA_TYPE_MAILBOX_IMAP;
@@ -1112,6 +1111,8 @@ libbalsa_mailbox_type_from_path(const gchar * path)
return G_TYPE_OBJECT;
if (S_ISDIR (st.st_mode)) {
+ char tmp[_POSIX_PATH_MAX];
+
/* check for maildir-style mailbox */
snprintf (tmp, sizeof (tmp), "%s/cur", path);
if (stat (tmp, &st) == 0 && S_ISDIR (st.st_mode))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]