Mercurial > pidgin.yaz
comparison pidgin/gtkprefs.c @ 22069:150993c9d509
Part of a large patch from o_sukhodolsky to fix some build warnings.
Refs #1344
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Sun, 13 Jan 2008 20:50:53 +0000 |
parents | 0503cd74cb56 |
children | 5130f2100fe1 |
comparison
equal
deleted
inserted
replaced
22068:a031a4fd6a7d | 22069:150993c9d509 |
---|---|
476 theme_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data, | 476 theme_got_url(PurpleUtilFetchUrlData *url_data, gpointer user_data, |
477 const gchar *themedata, size_t len, const gchar *error_message) | 477 const gchar *themedata, size_t len, const gchar *error_message) |
478 { | 478 { |
479 FILE *f; | 479 FILE *f; |
480 gchar *path; | 480 gchar *path; |
481 size_t wc; | |
481 | 482 |
482 if ((error_message != NULL) || (len == 0)) | 483 if ((error_message != NULL) || (len == 0)) |
483 return; | 484 return; |
484 | 485 |
485 f = purple_mkstemp(&path, TRUE); | 486 f = purple_mkstemp(&path, TRUE); |
486 fwrite(themedata, len, 1, f); | 487 wc = fwrite(themedata, len, 1, f); |
488 if (wc != 1) { | |
489 purple_debug_warning("theme_got_url", "Unable to write theme data.\n"); | |
490 fclose(f); | |
491 g_unlink(path); | |
492 g_free(path); | |
493 return; | |
494 } | |
487 fclose(f); | 495 fclose(f); |
488 | 496 |
489 theme_install_theme(path, user_data); | 497 theme_install_theme(path, user_data); |
490 | 498 |
491 g_unlink(path); | 499 g_unlink(path); |