Commit fbc1c1cf authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

replace fixed buffer sprintf() with straight fprintf()

parent ca04e8f3
Loading
Loading
Loading
Loading
+5 −7
Original line number Diff line number Diff line
@@ -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");