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
|
||||
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;
|
||||
size_t optlen, dlen = 0;
|
||||
|
@ -55,7 +55,7 @@ parseopts(char *popts, unsigned long *flags, char *data, size_t bufsiz)
|
|||
if(!validopt) {
|
||||
/* unknown option, pass as data option to mount() */
|
||||
if((optlen = strlen(name))) {
|
||||
if(dlen + optlen + 2 >= bufsiz)
|
||||
if(dlen + optlen + 2 >= datasiz)
|
||||
return; /* prevent overflow */
|
||||
if(dlen)
|
||||
data[dlen++] = ',';
|
||||
|
|
Loading…
Reference in New Issue