diff options
author | Hisham Muhammad <hisham@gobolinux.org> | 2011-12-25 20:23:53 +0000 |
---|---|---|
committer | Hisham Muhammad <hisham@gobolinux.org> | 2011-12-25 20:23:53 +0000 |
commit | 81e44312b4976d5516f129f36a67fe381bcb6883 (patch) | |
tree | 01f7dcdce2275ab6026f0f56762500fc8fa0a54b /FunctionBar.c | |
parent | 93233a67ea124b8127b50b45cd91c95ca022f8e7 (diff) |
Use strdup explicitly
Diffstat (limited to 'FunctionBar.c')
-rw-r--r-- | FunctionBar.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/FunctionBar.c b/FunctionBar.c index ef0fcba2..ba657492 100644 --- a/FunctionBar.c +++ b/FunctionBar.c @@ -54,8 +54,8 @@ FunctionBar* FunctionBar_new(const char** functions, const char** keys, int* eve this->events = malloc(sizeof(int) * 15); int i = 0; while (i < 15 && functions[i]) { - this->functions[i] = String_copy(functions[i]); - this->keys[i] = String_copy(keys[i]); + this->functions[i] = strdup(functions[i]); + this->keys[i] = strdup(keys[i]); this->events[i] = events[i]; i++; } @@ -89,7 +89,7 @@ void FunctionBar_setLabel(FunctionBar* this, int event, const char* text) { for (int i = 0; i < this->size; i++) { if (this->events[i] == event) { free(this->functions[i]); - this->functions[i] = String_copy(text); + this->functions[i] = strdup(text); break; } } |