From: Fabrice Desclaux Date: Tue, 21 Feb 2012 18:28:43 +0000 (+0100) Subject: parse_neighbor: replace printf printf_P X-Git-Url: http://git.droids-corp.org/?p=protos%2Fxbee-avr.git;a=commitdiff_plain;h=a8068f38bf6dc3997a57e27c1837242b983fe40c parse_neighbor: replace printf printf_P --- diff --git a/parse_neighbor.c b/parse_neighbor.c index 0285b03..3faa0c7 100644 --- a/parse_neighbor.c +++ b/parse_neighbor.c @@ -114,7 +114,7 @@ complete_get_elt_neighbor(parse_pgm_token_hdr_t *tk, int8_t idx, if (neigh == NULL) return -1; - len = snprintf(dstbuf, size, "%s", neigh->name); + len = snprintf_P(dstbuf, size, PSTR("%s"), neigh->name); if (len < 0 || len >= size) return -1; @@ -126,7 +126,7 @@ static int8_t help_neighbor(parse_pgm_token_hdr_t *tk, char *dstbuf, uint8_t size) { - snprintf(dstbuf, size, "Neighbor"); + snprintf_P(dstbuf, size, PSTR("Neighbor")); return 0; }