mirror of
https://github.com/apache/nuttx.git
synced 2026-08-01 20:28:58 +00:00
fsetpos: makes the fsetpos function comply with POSIX standard
Change the 'pos' parameter of fsetpos() from 'fpos_t *' to 'const fpos_t *' in both the prototype and implementation, aligning with POSIX specification which requires the position parameter to be const-qualified. Signed-off-by: guoshichao <guoshichao@xiaomi.com>
This commit is contained in:
parent
98eef560a3
commit
80fcbf7aa8
2 changed files with 2 additions and 2 deletions
|
|
@ -163,7 +163,7 @@ int fscanf(FAR FILE *stream, FAR const IPTR char *fmt, ...)
|
|||
scanf_like(2, 3);
|
||||
int fseek(FAR FILE *stream, long int offset, int whence);
|
||||
int fseeko(FAR FILE *stream, off_t offset, int whence);
|
||||
int fsetpos(FAR FILE *stream, FAR fpos_t *pos);
|
||||
int fsetpos(FAR FILE *stream, FAR const fpos_t *pos);
|
||||
long ftell(FAR FILE *stream);
|
||||
off_t ftello(FAR FILE *stream);
|
||||
size_t fwrite(FAR const void *ptr, size_t size, size_t n_items,
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@
|
|||
*
|
||||
****************************************************************************/
|
||||
|
||||
int fsetpos(FAR FILE *stream, FAR fpos_t *pos)
|
||||
int fsetpos(FAR FILE *stream, FAR const fpos_t *pos)
|
||||
{
|
||||
#ifdef CONFIG_DEBUG_FEATURES
|
||||
if (!stream || !pos)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue