]> git.droids-corp.org - protos/xbee-avr.git/commitdiff
parse_neighbor: replace printf printf_P
authorFabrice Desclaux <serpilliere@droids-corp.org>
Tue, 21 Feb 2012 18:28:43 +0000 (19:28 +0100)
committerFabrice Desclaux <serpilliere@droids-corp.org>
Tue, 21 Feb 2012 18:28:43 +0000 (19:28 +0100)
parse_neighbor.c

index 0285b03c8db38b0aa8877339fc7b729b5df19d58..3faa0c742c423961ae4a61985be0e894b75525f9 100644 (file)
@@ -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;
 }