mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Fix minor coding style issues in message splitting
This commit is contained in:
parent
695a6a7d9b
commit
1c73bde239
@ -970,10 +970,11 @@ char *ascii_strdown(char *str)
|
|||||||
char **strsplit_len(const char *str, int len)
|
char **strsplit_len(const char *str, int len)
|
||||||
{
|
{
|
||||||
char **ret;
|
char **ret;
|
||||||
int n = strlen(str) / len;
|
size_t total_len = strlen(str);
|
||||||
|
int n = total_len / len;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (strlen(str) % len)
|
if (total_len % len)
|
||||||
n++;
|
n++;
|
||||||
|
|
||||||
ret = g_new(char *, n + 1);
|
ret = g_new(char *, n + 1);
|
||||||
|
@ -198,15 +198,14 @@ char **recode_split(const SERVER_REC *server, const char *str,
|
|||||||
int n = 0;
|
int n = 0;
|
||||||
char **ret;
|
char **ret;
|
||||||
|
|
||||||
if (!str)
|
g_return_val_if_fail(str != NULL, NULL);
|
||||||
return NULL;
|
|
||||||
|
|
||||||
if (settings_get_bool("recode")) {
|
if (settings_get_bool("recode")) {
|
||||||
to = find_conversion(server, target);
|
to = find_conversion(server, target);
|
||||||
if (to == NULL)
|
if (to == NULL)
|
||||||
/* default outgoing charset if set */
|
/* default outgoing charset if set */
|
||||||
to = settings_get_str("recode_out_default_charset");
|
to = settings_get_str("recode_out_default_charset");
|
||||||
if (to && *to != '\0') {
|
if (to != NULL && *to != '\0') {
|
||||||
if (settings_get_bool("recode_transliterate") &&
|
if (settings_get_bool("recode_transliterate") &&
|
||||||
!is_translit(to))
|
!is_translit(to))
|
||||||
to = translit_to = g_strconcat(to,
|
to = translit_to = g_strconcat(to,
|
||||||
|
Loading…
Reference in New Issue
Block a user