More checks
This commit is contained in:
parent
88b6bfd1a2
commit
84fc38dc35
|
@ -187,8 +187,12 @@ int CASIO_EXPORT casio_sevenfs_open(sevenfs_cookie_t *cookie, sevenfs_path_t *pa
|
|||
casio_off_t size, casio_openmode_t mode, casio_stream_t **stream)
|
||||
{
|
||||
casio_link_t *handle = cookie; int err;
|
||||
const char *dirname = &path->sevenfs_path_data[path->sevenfs_path_dir];
|
||||
const char *filename = &path->sevenfs_path_data[path->sevenfs_path_file];
|
||||
const char *dirname = path->sevenfs_path_dir != 0xFF ?
|
||||
&path->sevenfs_path_data[path->sevenfs_path_dir] :
|
||||
NULL;
|
||||
const char *filename = path->sevenfs_path_file != 0xFF ?
|
||||
&path->sevenfs_path_data[path->sevenfs_path_file] :
|
||||
NULL;
|
||||
const char *devname = &path->sevenfs_path_data[path->sevenfs_path_dev];
|
||||
|
||||
/* Make checks (not really required) */
|
||||
|
|
|
@ -65,6 +65,11 @@
|
|||
|
||||
# define chk_dirname(CASIO__DN) /* TODO */
|
||||
|
||||
/* Check that the directory name is there and ok. */
|
||||
|
||||
# define chk_required_dirname(CASIO__DN) \
|
||||
if (!(CASIO_DN)) return (casio_error_invalid);
|
||||
|
||||
/* Check that the MCS request head is ok. */
|
||||
|
||||
# define chk_head(CASIO__HD) \
|
||||
|
|
Loading…
Reference in New Issue