Removed unnecessary static-locals.
In this file there's no access to the W5100 auto-increment registers so there's no need for the special compiler settings. However, with "true" local variables the buffer to read the HTTP header into is better not placed in a local variable. Note: The heap manager was already active before as both linenoise and the file I/O use it.
This commit is contained in:
parent
406a0628bd
commit
6bd1047a7d
11
stream-pdm.c
11
stream-pdm.c
|
@ -12,11 +12,6 @@
|
|||
#include "w5100_http.h"
|
||||
#include "linenoise.h"
|
||||
|
||||
// Both pragmas are obligatory to have cc65 generate code
|
||||
// suitable to access the W5100 auto-increment registers.
|
||||
#pragma optimize (on)
|
||||
#pragma static-locals (on)
|
||||
|
||||
void streamafterexit(uint8_t eth_init);
|
||||
|
||||
void error_exit(void)
|
||||
|
@ -126,12 +121,14 @@ void main(void)
|
|||
w5100_config(eth_init);
|
||||
|
||||
{
|
||||
char buffer[0x1000];
|
||||
char *http = malloc(0x1000);
|
||||
|
||||
if (!w5100_http_open(url_ip, url_port, url_selector, buffer, sizeof(buffer)))
|
||||
if (!http || !w5100_http_open(url_ip, url_port, url_selector, http, 0x1000))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
free(http);
|
||||
}
|
||||
|
||||
clrscr();
|
||||
|
|
Loading…
Reference in New Issue