mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 08:43:19 -04:00
fetch(1): fix error in previous commit
strncmp() compares terminating zero and sizeof() includes it. Un-obsfuscate the code and show what it is indended to do.
This commit is contained in:
parent
bf599c03f0
commit
08a2504a20
1 changed files with 1 additions and 1 deletions
|
|
@ -476,7 +476,7 @@ fetch(char *URL, const char *path, int *is_http)
|
|||
}
|
||||
|
||||
/* for both of http and https */
|
||||
*is_http = strncmp(url->scheme, SCHEME_HTTP, sizeof(SCHEME_HTTP)) == 0;
|
||||
*is_http = strncmp(url->scheme, "http", 4) == 0;
|
||||
|
||||
/* common flags */
|
||||
switch (family) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue