代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/libomxil-bellagio 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
--- a/src/omxregister.c.old 2014-06-28 16:08:29.777324056 +0100
+++ b/src/omxregister.c 2014-06-28 16:08:20.960691774 +0100
@@ -76,11 +76,11 @@
long int offset;
int i;
- buffer = malloc(allocation_length+1);
- comp_name = malloc(DEFAULT_LINE_LENGHT);
- temp_name = malloc(DEFAULT_LINE_LENGHT);
- comp_rules = malloc(DEFAULT_LINE_LENGHT);
- checkChar = malloc(2);
+ buffer = calloc(allocation_length+1, sizeof(char));
+ comp_name = calloc(DEFAULT_LINE_LENGHT, sizeof(char));
+ temp_name = calloc(DEFAULT_LINE_LENGHT, sizeof(char));
+ comp_rules = calloc(DEFAULT_LINE_LENGHT, sizeof(char));
+ checkChar = calloc(2, sizeof(char));
printf("*********************************\n");
printf("* List of registered components *\n");
@@ -182,8 +182,8 @@
* and is is colon separated like env variables in Linux
*/
- qualityString = malloc(4096);
- buffer = malloc(8192);
+ qualityString = calloc(4096, sizeof(char));
+ buffer = calloc(8192, sizeof(char));
while (!pathconsumed) {
index = 0;
currentgiven = 0;
@@ -194,11 +194,11 @@
if ((*(currentpath + index) == ':') || (*(currentpath + index) =='\0')) {
currentgiven = 1;
if (*(currentpath + index - 1) != '/') {
- actual = malloc(index + 2);
+ actual = calloc(index + 2, sizeof(char));
*(actual + index) = '/';
*(actual+index + 1) = '\0';
} else {
- actual = malloc(index + 1);
+ actual = calloc(index + 1, sizeof(char));
*(actual+index) = '\0';
}
strncpy(actual, currentpath, index);
@@ -240,7 +240,7 @@
}
num_of_libraries++;
num_of_comp = fptr(NULL);
- stComponents = malloc(num_of_comp * sizeof(stLoaderComponentType*));
+ stComponents = calloc(num_of_comp, sizeof(stLoaderComponentType*));
for (i = 0; i<num_of_comp; i++) {
stComponents[i] = calloc(1,sizeof(stLoaderComponentType));
stComponents[i]->nqualitylevels = 0;
@@ -266,14 +266,14 @@
}
}
if (allNames == NULL) {
- allNames = malloc(sizeof(nameList));
+ allNames = calloc(1, sizeof(nameList));
currentName = allNames;
} else {
- currentName->next = malloc(sizeof(nameList));
+ currentName->next = calloc(1, sizeof(nameList));
currentName = currentName->next;
}
currentName->next = NULL;
- currentName->name = malloc(strlen(stComponents[i]->name) + 1);
+ currentName->name = calloc(strlen(stComponents[i]->name) + 1, sizeof(char));
strcpy(currentName->name, stComponents[i]->name);
*(currentName->name + strlen(currentName->name)) = '\0';
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。