[MPlayer-cvslog] r18862 - in trunk: input/input.c libaf/af_export.c libmenu/menu_console.c loader/ldt_keeper.c
reynaldo
subversion at mplayerhq.hu
Fri Jun 30 06:24:11 CEST 2006
Author: reynaldo
Date: Fri Jun 30 06:24:07 2006
New Revision: 18862
Modified:
trunk/input/input.c
trunk/libaf/af_export.c
trunk/libmenu/menu_console.c
trunk/loader/ldt_keeper.c
Log:
gets ride of a few more sizeof(char)s
Modified: trunk/input/input.c
==============================================================================
--- trunk/input/input.c (original)
+++ trunk/input/input.c Fri Jun 30 06:24:07 2006
@@ -690,7 +690,7 @@
ptr2 = e + 1;
l--;
}
- cmd->args[i].v.s = (char*)malloc((l+1)*sizeof(char));
+ cmd->args[i].v.s = (char*)malloc(l+1);
strncpy(cmd->args[i].v.s,start,l);
cmd->args[i].v.s[l] = '\0';
if(term != ' ') ptr += l+2;
@@ -746,7 +746,7 @@
// Allocate the buffer if it doesn't exist
if(!mp_fd->buffer) {
- mp_fd->buffer = (char*)malloc(MP_CMD_MAX_SIZE*sizeof(char));
+ mp_fd->buffer = (char*)malloc(MP_CMD_MAX_SIZE);
mp_fd->pos = 0;
mp_fd->size = MP_CMD_MAX_SIZE;
}
@@ -802,7 +802,7 @@
// Not dropping : put the cmd in ret
if( ! (mp_fd->flags & MP_FD_DROP)) {
- (*ret) = (char*)malloc((l+1)*sizeof(char));
+ (*ret) = (char*)malloc(l+1);
strncpy((*ret),mp_fd->buffer,l);
(*ret)[l] = '\0';
} else { // Remove the dropping flag
Modified: trunk/libaf/af_export.c
==============================================================================
--- trunk/libaf/af_export.c (original)
+++ trunk/libaf/af_export.c Fri Jun 30 06:24:07 2006
@@ -135,7 +135,7 @@
if(s->filename)
free(s->filename);
- s->filename = calloc(i + 1, sizeof(char));
+ s->filename = calloc(i + 1, 1);
memcpy(s->filename, str, i);
s->filename[i] = 0;
Modified: trunk/libmenu/menu_console.c
==============================================================================
--- trunk/libmenu/menu_console.c (original)
+++ trunk/libmenu/menu_console.c Fri Jun 30 06:24:07 2006
@@ -467,7 +467,7 @@
mpriv->lines = calloc(mpriv->buf_lines,sizeof(char*));
mpriv->prompt = mpriv->mp_prompt;
mpriv->cur_history = mpriv->history = calloc(1,sizeof(history_t));
- mpriv->cur_history->buffer = calloc(255,sizeof(char));
+ mpriv->cur_history->buffer = calloc(255,1);
mpriv->cur_history->size = 255;
if(args)
Modified: trunk/loader/ldt_keeper.c
==============================================================================
--- trunk/loader/ldt_keeper.c (original)
+++ trunk/loader/ldt_keeper.c Fri Jun 30 06:24:07 2006
@@ -272,7 +272,7 @@
Setup_FS_Segment();
- ldt_fs->prev_struct = (char*)malloc(sizeof(char) * 8);
+ ldt_fs->prev_struct = (char*)malloc(8);
*(void**)array.base_addr = ldt_fs->prev_struct;
return ldt_fs;
More information about the MPlayer-cvslog
mailing list