This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch master
in repository enlightenment.
View the commit online.
commit 53a5551a678daeac198d39a10eb575712984cb71
Author: rafspiny <rafsp...@gmail.com>
AuthorDate: Wed Aug 2 22:23:31 2023 +0200
Use strdup
---
src/modules/convertible/e_mod_main.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/src/modules/convertible/e_mod_main.c b/src/modules/convertible/e_mod_main.c
index 1d080e8d0..306655a91 100644
--- a/src/modules/convertible/e_mod_main.c
+++ b/src/modules/convertible/e_mod_main.c
@@ -305,12 +305,8 @@ e_modapi_init(E_Module *m)
// Arbitrarily chosen a condition to check that rotation is enabled
if (screen->info.can_rot_90 == EINA_TRUE)
{
- int max_screen_length = 300;
- char *randr2_id = malloc(sizeof(char) * max_screen_length);
- int copied_chars = eina_strlcpy(randr2_id, zone->randr2_id, max_screen_length);
- if (copied_chars > max_screen_length)
- ERR("Screen name %s has been truncated. Cannot handle screens.", randr2_id);
- if (copied_chars < 0)
+ char *randr2_id = strdup(zone->randr2_id);
+ if (randr2_id == NULL)
ERR("Can't copy the screen name");
inst->randr2_ids = eina_list_append(inst->randr2_ids, randr2_id);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.