mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2026-03-14 05:00:58 +01:00
bbf: fix compiler warnings
This commit is contained in:
parent
5dfeca7cdb
commit
83f69f9c53
2 changed files with 8 additions and 2 deletions
|
|
@ -1623,7 +1623,7 @@ static void get_priority(char *uci_opt_name, void *data, char **value)
|
|||
|
||||
static void set_priority(char *uci_opt_name, void *data, char *value)
|
||||
{
|
||||
char buf[4];
|
||||
char buf[16];
|
||||
char *pch, *pchr;
|
||||
int i;
|
||||
|
||||
|
|
|
|||
|
|
@ -219,7 +219,13 @@ static int set_IP_IPv6Enable(char *refparam, struct dmctx *ctx, void *data, char
|
|||
char *buffer = dmcalloc(1, length+1);
|
||||
if (buffer) {
|
||||
fseek(fp, 0, SEEK_SET);
|
||||
fread(buffer, 1, length, fp);
|
||||
size_t len = fread(buffer, 1, length, fp);
|
||||
if (len != length) {
|
||||
dmfree(buffer);
|
||||
fclose(fp);
|
||||
break;
|
||||
}
|
||||
|
||||
char *ptr = strstr(buffer, "net.ipv6.conf.all.disable_ipv6");
|
||||
if (ptr) {
|
||||
*(ptr+31) = (b) ? '0' : '1';
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue