Changeset d4927a7 for zwrite.c


Ignore:
Timestamp:
Feb 11, 2011, 4:31:46 PM (10 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.8, release-1.9
Children:
3472845
Parents:
ddbbcffa
git-author:
Anders Kaseorg <andersk@mit.edu> (08/27/09 00:55:10)
git-committer:
Anders Kaseorg <andersk@mit.edu> (02/11/11 16:31:46)
Message:
Replace owl_strdup with g_strdup.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Reviewed-by: Karl Ramm <kcr@mit.edu>
File:
1 edited

Legend:

Unmodified
Added
Removed
  • zwrite.c

    rddbbcffa rd4927a7  
    3535  z->noping=0;
    3636  owl_list_create(&(z->recips));
    37   z->zwriteline = owl_strdup(line);
     37  z->zwriteline = g_strdup(line);
    3838
    3939  /* parse the command line for options */
     
    4646  myargc=argc;
    4747  if (myargc && *(myargv[0])!='-') {
    48     z->cmd=owl_strdup(myargv[0]);
     48    z->cmd=g_strdup(myargv[0]);
    4949    myargc--;
    5050    myargv++;
     
    137137
    138138  /* now deal with defaults */
    139   if (z->class==NULL) z->class=owl_strdup("message");
    140   if (z->inst==NULL) z->inst=owl_strdup("personal");
    141   if (z->realm==NULL) z->realm=owl_strdup("");
    142   if (z->opcode==NULL) z->opcode=owl_strdup("");
     139  if (z->class==NULL) z->class=g_strdup("message");
     140  if (z->inst==NULL) z->inst=g_strdup("personal");
     141  if (z->realm==NULL) z->realm=g_strdup("");
     142  if (z->opcode==NULL) z->opcode=g_strdup("");
    143143  /* z->message is allowed to stay NULL */
    144144
     
    178178      to = owl_sprintf("%s@%s", (const char *) owl_list_get_element(&(z->recips), i), z->realm);
    179179    } else {
    180       to = owl_strdup(owl_list_get_element(&(z->recips), i));
     180      to = g_strdup(owl_list_get_element(&(z->recips), i));
    181181    }
    182182    send_ping(to, z->class, z->inst);
     
    203203  j=owl_list_get_size(&(z->recips));
    204204  if (j>0 && z->cc) {
    205     toline = owl_strdup( "CC: ");
     205    toline = g_strdup( "CC: ");
    206206    for (i=0; i<j; i++) {
    207207      tmp = toline;
     
    252252        to = owl_sprintf("%s@%s", (const char *) owl_list_get_element(&(z->recips), i), z->realm);
    253253      } else {
    254         to = owl_strdup( owl_list_get_element(&(z->recips), i));
     254        to = g_strdup( owl_list_get_element(&(z->recips), i));
    255255      }
    256256      ret = send_zephyr(z->opcode, z->zsig, z->class, z->inst, to, z->message);
     
    319319{
    320320  if(z->zsig) g_free(z->zsig);
    321   z->zsig = owl_strdup(zsig);
     321  z->zsig = g_strdup(zsig);
    322322}
    323323
Note: See TracChangeset for help on using the changeset viewer.