[BACK]Return to cmd-load-buffer.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / tmux

Diff for /src/usr.bin/tmux/cmd-load-buffer.c between version 1.20 and 1.21

version 1.20, 2012/05/21 18:27:42 version 1.21, 2012/07/10 11:53:01
Line 62 
Line 62 
                 buffer = args_strtonum(args, 'b', 0, INT_MAX, &cause);                  buffer = args_strtonum(args, 'b', 0, INT_MAX, &cause);
                 if (cause != NULL) {                  if (cause != NULL) {
                         ctx->error(ctx, "buffer %s", cause);                          ctx->error(ctx, "buffer %s", cause);
                         xfree(cause);                          free(cause);
                         return (-1);                          return (-1);
                 }                  }
         }          }
Line 76 
Line 76 
                     buffer_ptr, &cause);                      buffer_ptr, &cause);
                 if (error != 0) {                  if (error != 0) {
                         ctx->error(ctx, "%s: %s", path, cause);                          ctx->error(ctx, "%s: %s", path, cause);
                         xfree(cause);                          free(cause);
                         return (-1);                          return (-1);
                 }                  }
                 return (1);                  return (1);
Line 127 
Line 127 
         }          }
         if (paste_replace(&global_buffers, buffer, pdata, psize) != 0) {          if (paste_replace(&global_buffers, buffer, pdata, psize) != 0) {
                 ctx->error(ctx, "no buffer %d", buffer);                  ctx->error(ctx, "no buffer %d", buffer);
                 xfree(pdata);                  free(pdata);
                 return (-1);                  return (-1);
         }          }
   
         return (0);          return (0);
   
 error:  error:
         if (pdata != NULL)          free(pdata);
                 xfree(pdata);  
         if (f != NULL)          if (f != NULL)
                 fclose(f);                  fclose(f);
         return (-1);          return (-1);
Line 158 
Line 157 
   
         psize = EVBUFFER_LENGTH(c->stdin_data);          psize = EVBUFFER_LENGTH(c->stdin_data);
         if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) {          if (psize == 0 || (pdata = malloc(psize + 1)) == NULL) {
                 xfree(data);                  free(data);
                 return;                  return;
         }          }
         memcpy(pdata, EVBUFFER_DATA(c->stdin_data), psize);          memcpy(pdata, EVBUFFER_DATA(c->stdin_data), psize);
Line 174 
Line 173 
                 server_push_stderr(c);                  server_push_stderr(c);
         }          }
   
         xfree(data);          free(data);
 }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21