mirror of git://git.suckless.org/ubase
mount: rename bufsiz to datasiz for clarity
datasiz relates to the size of data Signed-off-by: Hiltjo Posthuma <hiltjo@codemadness.org>
This commit is contained in:
parent
5f4d18d4fa
commit
3c47a9a9d6
4
mount.c
4
mount.c
|
@ -31,7 +31,7 @@ struct {
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
parseopts(char *popts, unsigned long *flags, char *data, size_t bufsiz)
|
parseopts(char *popts, unsigned long *flags, char *data, size_t datasiz)
|
||||||
{
|
{
|
||||||
unsigned int i, validopt;
|
unsigned int i, validopt;
|
||||||
size_t optlen, dlen = 0;
|
size_t optlen, dlen = 0;
|
||||||
|
@ -55,7 +55,7 @@ parseopts(char *popts, unsigned long *flags, char *data, size_t bufsiz)
|
||||||
if(!validopt) {
|
if(!validopt) {
|
||||||
/* unknown option, pass as data option to mount() */
|
/* unknown option, pass as data option to mount() */
|
||||||
if((optlen = strlen(name))) {
|
if((optlen = strlen(name))) {
|
||||||
if(dlen + optlen + 2 >= bufsiz)
|
if(dlen + optlen + 2 >= datasiz)
|
||||||
return; /* prevent overflow */
|
return; /* prevent overflow */
|
||||||
if(dlen)
|
if(dlen)
|
||||||
data[dlen++] = ',';
|
data[dlen++] = ',';
|
||||||
|
|
Loading…
Reference in New Issue