diff --git a/src/neighbor.cpp b/src/neighbor.cpp
index bc22fffc48fbe1d8bd0ebb9f49389b147a91256a..84494bfbc5945c19e729c390bf3cc2fb95621e02 100644
--- a/src/neighbor.cpp
+++ b/src/neighbor.cpp
@@ -1408,7 +1408,6 @@ void Neighbor::init_topology()
 void Neighbor::print_pairwise_info()
 {
   int i,m;
-  char str[256];
   NeighRequest *rq;
   FILE *out;
 
@@ -1457,18 +1456,17 @@ void Neighbor::print_pairwise_info()
         rq = requests[i];
         if (rq->pair) {
           char *pname = force->pair_match_ptr((Pair *) rq->requestor);
-          sprintf(str,"  (%d) pair %s",i+1,pname);
+          fprintf(out,"  (%d) pair %s",i+1,pname);
         } else if (rq->fix) {
-          sprintf(str,"  (%d) fix %s",i+1,((Fix *) rq->requestor)->style);
+          fprintf(out,"  (%d) fix %s",i+1,((Fix *) rq->requestor)->style);
         } else if (rq->compute) {
-          sprintf(str,"  (%d) compute %s",i+1,
+          fprintf(out,"  (%d) compute %s",i+1,
                   ((Compute *) rq->requestor)->style);
         } else if (rq->command) {
-          sprintf(str,"  (%d) command %s",i+1,rq->command_style);
+          fprintf(out,"  (%d) command %s",i+1,rq->command_style);
         } else if (rq->neigh) {
-          sprintf(str,"  (%d) neighbor class addition",i+1);
+          fprintf(out,"  (%d) neighbor class addition",i+1);
         }
-        fprintf(out,"%s",str);
 
         if (rq->occasional) fprintf(out,", occasional");
         else fprintf(out,", perpetual");