mirror of
https://github.com/libretro/RetroArch
synced 2025-03-16 07:21:03 +00:00
Prevent some implicit memsets and reduce the size of some
char variables
This commit is contained in:
parent
70cbecd9f8
commit
6310f53587
@ -63,7 +63,7 @@ typedef struct video4linux
|
||||
uint32_t *buffer_output;
|
||||
bool ready;
|
||||
|
||||
char dev_name[PATH_MAX_LENGTH];
|
||||
char dev_name[255];
|
||||
} video4linux_t;
|
||||
|
||||
static void process_image(video4linux_t *v4l, const uint8_t *buffer_yuv)
|
||||
|
@ -176,7 +176,9 @@ static void handle_plugged_pad(void)
|
||||
else if (event->mask & (IN_CREATE | IN_ATTRIB))
|
||||
{
|
||||
bool ret;
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
char path[PATH_MAX_LENGTH];
|
||||
|
||||
path[0] = '\0';
|
||||
|
||||
snprintf(path, sizeof(path), "/dev/input/%s", event->name);
|
||||
ret = linuxraw_joypad_init_pad(path, &linuxraw_pads[idx]);
|
||||
@ -227,11 +229,13 @@ static bool linuxraw_joypad_init(void *data)
|
||||
|
||||
for (i = 0; i < MAX_USERS; i++)
|
||||
{
|
||||
char path[PATH_MAX_LENGTH] = {0};
|
||||
char path[PATH_MAX_LENGTH];
|
||||
autoconfig_params_t params = {{0}};
|
||||
struct linuxraw_joypad *pad = (struct linuxraw_joypad*)&linuxraw_pads[i];
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
path[0] = '\0';
|
||||
|
||||
params.idx = i;
|
||||
pad->fd = -1;
|
||||
pad->ident = settings->input.device_names[i];
|
||||
|
@ -433,14 +433,18 @@ static int zip_parse_file_iterate_step_internal(
|
||||
static int zip_parse_file_iterate_step(file_archive_transfer_t *state,
|
||||
const char *valid_exts, struct archive_extract_userdata *userdata, file_archive_file_cb file_cb)
|
||||
{
|
||||
char filename[PATH_MAX_LENGTH];
|
||||
int ret;
|
||||
const uint8_t *cdata = NULL;
|
||||
uint32_t checksum = 0;
|
||||
uint32_t size = 0;
|
||||
uint32_t csize = 0;
|
||||
unsigned cmode = 0;
|
||||
unsigned payload = 0;
|
||||
char filename[PATH_MAX_LENGTH] = {0};
|
||||
int ret = zip_parse_file_iterate_step_internal(state, filename,
|
||||
|
||||
filename[0] = '\0';
|
||||
|
||||
ret = zip_parse_file_iterate_step_internal(state, filename,
|
||||
&cdata, &cmode, &size, &csize,
|
||||
&checksum, &payload);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user