diff options
author | Tom Hacohen <tom@stosb.com> | 2015-12-21 14:45:34 +0000 |
---|---|---|
committer | Tom Hacohen <tom@stosb.com> | 2015-12-21 14:45:34 +0000 |
commit | f366cdeb7663f0f7e52fad78d9770572d27a4640 (patch) | |
tree | a60665ffe394352d0b06897b39f3173ece18bb6c | |
parent | b4fca621509571623f3c5b25cc547cca699d09d5 (diff) | |
download | elementary-f366cdeb7663f0f7e52fad78d9770572d27a4640.tar.gz |
Entry: clean up single line init function.
-rw-r--r-- | src/lib/elm_entry.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/lib/elm_entry.c b/src/lib/elm_entry.c index fa28a3790..b7c953d9d 100644 --- a/src/lib/elm_entry.c +++ b/src/lib/elm_entry.c @@ -2665,16 +2665,17 @@ _entry_new_line_filter_cb(void *data EINA_UNUSED, Evas_Object *entry EINA_UNUSED, char **text) { - char *old_text; + char *ret; if (!*text) return; - old_text = *text; - *text = _entry_remove_new_line((const char*)*text); - if (*text) - free(old_text); - else - *text = old_text; + ret = _entry_remove_new_line(*text); + + if (ret) + { + free(*text); + *text = ret; + } } static void |