diff options
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/pop.c | 2 | ||||
-rw-r--r-- | libsylph/utils.c | 14 |
2 files changed, 8 insertions, 8 deletions
diff --git a/libsylph/pop.c b/libsylph/pop.c index 7988ef48..8b110b3e 100644 --- a/libsylph/pop.c +++ b/libsylph/pop.c @@ -187,7 +187,7 @@ static gint pop3_getrange_stat_send(Pop3Session *session) static gint pop3_getrange_stat_recv(Pop3Session *session, const gchar *msg) { - if (sscanf(msg, "%d %Ld", &session->count, &session->total_bytes) != 2) { + if (sscanf(msg, "%d %lld", &session->count, &session->total_bytes) != 2) { log_warning(_("POP3 protocol error\n")); session->error_val = PS_PROTOCOL; return -1; diff --git a/libsylph/utils.c b/libsylph/utils.c index e6703186..e99f3d3a 100644 --- a/libsylph/utils.c +++ b/libsylph/utils.c @@ -269,16 +269,16 @@ gchar *itos(gint n) gchar *to_human_readable(gint64 size) { - static gchar str[10]; + static gchar str[16]; if (size < 1024) - g_snprintf(str, sizeof(str), _("%dB"), (gint)size); - else if (size >> 10 < 1024) - g_snprintf(str, sizeof(str), _("%.1fKB"), (gfloat)size / (1 << 10)); - else if (size >> 20 < 1024) - g_snprintf(str, sizeof(str), _("%.2fMB"), (gfloat)size / (1 << 20)); + g_snprintf(str, sizeof(str), "%dB", (gint)size); + else if ((size >> 10) < 1024) + g_snprintf(str, sizeof(str), "%.1fKB", (gfloat)size / (1 << 10)); + else if ((size >> 20) < 1024) + g_snprintf(str, sizeof(str), "%.2fMB", (gfloat)size / (1 << 20)); else - g_snprintf(str, sizeof(str), _("%.2fGB"), (gfloat)size / (1 << 30)); + g_snprintf(str, sizeof(str), "%.2fGB", (gfloat)size / (1 << 30)); return str; } |