mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 11:56:10 +08:00
fsetpos: makes the fsetpos function comply with POSIX standard
Build Documentation / build-html (push) Has been cancelled
Build Documentation / build-html (push) Has been cancelled
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:
+1
-1
@@ -163,7 +163,7 @@ int fscanf(FAR FILE *stream, FAR const IPTR char *fmt, ...)
|
|||||||
scanf_like(2, 3);
|
scanf_like(2, 3);
|
||||||
int fseek(FAR FILE *stream, long int offset, int whence);
|
int fseek(FAR FILE *stream, long int offset, int whence);
|
||||||
int fseeko(FAR FILE *stream, off_t 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);
|
long ftell(FAR FILE *stream);
|
||||||
off_t ftello(FAR FILE *stream);
|
off_t ftello(FAR FILE *stream);
|
||||||
size_t fwrite(FAR const void *ptr, size_t size, size_t n_items,
|
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
|
#ifdef CONFIG_DEBUG_FEATURES
|
||||||
if (!stream || !pos)
|
if (!stream || !pos)
|
||||||
|
|||||||
Reference in New Issue
Block a user