1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-29 04:45:57 -04:00

Fix minor coding style issues in message splitting

This commit is contained in:
Sebastian Thorarensen 2014-07-06 20:31:58 +02:00
parent 695a6a7d9b
commit 1c73bde239
2 changed files with 5 additions and 5 deletions

View File

@ -970,10 +970,11 @@ char *ascii_strdown(char *str)
char **strsplit_len(const char *str, int len)
{
char **ret;
int n = strlen(str) / len;
size_t total_len = strlen(str);
int n = total_len / len;
int i;
if (strlen(str) % len)
if (total_len % len)
n++;
ret = g_new(char *, n + 1);

View File

@ -198,15 +198,14 @@ char **recode_split(const SERVER_REC *server, const char *str,
int n = 0;
char **ret;
if (!str)
return NULL;
g_return_val_if_fail(str != NULL, NULL);
if (settings_get_bool("recode")) {
to = find_conversion(server, target);
if (to == NULL)
/* default outgoing charset if set */
to = settings_get_str("recode_out_default_charset");
if (to && *to != '\0') {
if (to != NULL && *to != '\0') {
if (settings_get_bool("recode_transliterate") &&
!is_translit(to))
to = translit_to = g_strconcat(to,