Fix double frees and incorrect nprintf in eina_string example

Reviewers: cedric, ajwillia.ms, zmike

Differential Revision: https://phab.enlightenment.org/D6012
This commit is contained in:
Xavi Artigas 2018-05-01 13:14:42 -04:00 committed by Mike Blumenkrantz
parent 0448e6cfa4
commit 09923d92c2
1 changed files with 1 additions and 2 deletions

View File

@ -53,7 +53,6 @@ _string_case()
eina_str_toupper(&str);
printf(" Upper: %s\n", str);
free(str);
eina_str_tolower(&str);
printf(" Lower: %s\n", str);
@ -130,7 +129,7 @@ _string_share()
str = eina_stringshare_printf(line2, 12, 3, 4, "four");
printf("Line2: %s\n", str);
eina_stringshare_del(str);
str = eina_stringshare_nprintf(48, line2, 12, 7, 5);
str = eina_stringshare_nprintf(48, line2, 12, 7, 5, "four");
printf(" format limit (len %d): %s...\n", eina_stringshare_strlen(str), str);
eina_stringshare_del(str);