Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion fs/vfs/fs_fcntl.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ static int file_vfcntl(FAR struct file *filep, int cmd, va_list ap)

if ((filep->f_oflags & O_APPEND) != 0)
{
file_seek(filep, 0, SEEK_END);
ret = file_seek(filep, 0, SEEK_END);
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions libs/libc/modlib/modlib_bind.c
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ static int modlib_relocatedyn(FAR struct module_s *modp,

/* Assume DT_RELA to get maximum size required */

rels = lib_malloc(CONFIG_MODLIB_RELOCATION_BUFFERCOUNT * sizeof(Elf_Rela));
rels = lib_zalloc(CONFIG_MODLIB_RELOCATION_BUFFERCOUNT * sizeof(Elf_Rela));
if (!rels)
{
berr("Failed to allocate memory for elf relocation rels\n");
Expand Down Expand Up @@ -774,7 +774,10 @@ static int modlib_relocatedyn(FAR struct module_s *modp,
}
else
{
Elf_Sym dynsym;
Elf_Sym dynsym =
{
0
};

addr = rel->r_offset - loadinfo->datasec + loadinfo->datastart;

Expand Down
35 changes: 15 additions & 20 deletions libs/libc/pthread/pthread_mutexattr_setprotocol.c
Original file line number Diff line number Diff line change
Expand Up @@ -54,38 +54,33 @@ int pthread_mutexattr_setprotocol(FAR pthread_mutexattr_t *attr,
linfo("attr=%p protocol=%d\n", attr, protocol);
DEBUGASSERT(attr != NULL);

if (protocol >= PTHREAD_PRIO_NONE && protocol <= PTHREAD_PRIO_PROTECT)
switch (protocol)
{
switch (protocol)
{
case PTHREAD_PRIO_NONE:
case PTHREAD_PRIO_NONE:
#if defined(CONFIG_PRIORITY_INHERITANCE) || defined(CONFIG_PRIORITY_PROTECT)
attr->proto = PTHREAD_PRIO_INHERIT;
attr->proto = PTHREAD_PRIO_INHERIT;
#endif
break;
break;

case PTHREAD_PRIO_INHERIT:
case PTHREAD_PRIO_INHERIT:
#ifdef CONFIG_PRIORITY_INHERITANCE
attr->proto = PTHREAD_PRIO_INHERIT;
break;
attr->proto = PTHREAD_PRIO_INHERIT;
break;
#else
return ENOTSUP;
return ENOTSUP;
#endif /* CONFIG_PRIORITY_INHERITANCE */

case PTHREAD_PRIO_PROTECT:
case PTHREAD_PRIO_PROTECT:
#ifdef CONFIG_PRIORITY_PROTECT
attr->proto = PTHREAD_PRIO_PROTECT;
break;
attr->proto = PTHREAD_PRIO_PROTECT;
break;
#else
return ENOTSUP;
return ENOTSUP;
#endif /* CONFIG_PRIORITY_PROTECT */

default:
return ENOTSUP;
}

return OK;
default:
return EINVAL;
}

return EINVAL;
return OK;
}
2 changes: 1 addition & 1 deletion libs/libc/search/hcreate.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ void hdestroy(void)

FAR ENTRY *hsearch(ENTRY item, ACTION action)
{
FAR ENTRY *retval;
FAR ENTRY *retval = NULL;

hsearch_r(item, action, &retval, &g_htab);

Expand Down