Changeset fa4562c


Ignore:
Timestamp:
Aug 15, 2009, 7:08:18 PM (8 years ago)
Author:
Anders Kaseorg <andersk@mit.edu>
Branches:
master, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
e19eb97
Parents:
65b2173
git-author:
Anders Kaseorg <andersk@mit.edu> (08/04/09 02:59:42)
git-committer:
Anders Kaseorg <andersk@mit.edu> (08/15/09 19:08:18)
Message:
Prepare code for adding const qualifiers for char * and void *.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • aim.c

    r5227de4 rfa4562c  
    16711671  for (i=0; i<num; i++) {
    16721672    owl_function_debugmsg("  %s", &SNs[i*(MAXSNLEN+1)]);
    1673     owl_list_append_element(&list, &SNs[i*(MAXSNLEN+1)]);
     1673    owl_list_append_element(&list, (void *)&SNs[i*(MAXSNLEN+1)]);
    16741674  }
    16751675  owl_function_aimsearch_results(address, &list);
  • cmd.c

    r65b2173 rfa4562c  
    211211        return NULL;
    212212      }
    213       ival = strtol(argv[1], &ep, 10);
     213      ival = strtol(argv[1], (char **)&ep, 10);
    214214      if (*ep || ep==argv[1]) {
    215215        owl_function_makemsg("Invalid argument '%s' for %s command.", argv[1], argv[0]);
  • commands.c

    r65b2173 rfa4562c  
    24652465  }
    24662466  filtname = owl_view_get_filtname(owl_global_get_current_view(&g));
    2467   if (filtname) filtname = owl_strdup(filtname);
    2468   return filtname;
     2467  if (filtname) return owl_strdup(filtname);
     2468  return NULL;
    24692469}
    24702470
     
    25662566  }
    25672567  stylename = owl_view_get_style_name(owl_global_get_current_view(&g));
    2568   if (stylename) stylename = owl_strdup(stylename);
    2569   return stylename;
     2568  if (stylename) return owl_strdup(stylename);
     2569  return NULL;
    25702570}
    25712571
  • obarray.c

    r4d86e06 rfa4562c  
    5555  i = owl_obarray_lookup(oa, string, &v);
    5656  if(!v) {
    57     v = owl_strdup(string);
    58     owl_list_insert_element(&(oa->strings), i, v);
     57    char *v2 = owl_strdup(string);
     58    owl_list_insert_element(&(oa->strings), i, v2);
     59    return v2;
    5960  }
    6061  return v;
  • perlconfig.c

    r65b2173 rfa4562c  
    2626  HV *h, *stash;
    2727  SV *hr;
    28   char *ptr, *blessas, *type;
     28  char *type;
     29  char *ptr, *utype, *blessas;
    2930  int i, j;
    3031  owl_pair *pair;
     
    9596  type = owl_message_get_type(m);
    9697  if(!type || !*type) type = "generic";
    97   type = owl_strdup(type);
    98   type[0] = toupper(type[0]);
    99   blessas = owl_sprintf("BarnOwl::Message::%s", type);
     98  utype = owl_strdup(type);
     99  utype[0] = toupper(type[0]);
     100  blessas = owl_sprintf("BarnOwl::Message::%s", utype);
    100101
    101102  hr = newRV_noinc((SV*)h);
     
    106107  }
    107108  hr = sv_bless(hr,stash);
    108   owl_free(type);
     109  owl_free(utype);
    109110  owl_free(blessas);
    110111  return hr;
     
    312313  owl_global_set_no_have_config(&g);
    313314
    314   ret=perl_parse(p, owl_perl_xs_init, 2, args, NULL);
     315  ret=perl_parse(p, owl_perl_xs_init, 2, (char **)args, NULL);
    315316  if (ret || SvTRUE(ERRSV)) {
    316317    err=owl_strdup(SvPV_nolen(ERRSV));
  • util.c

    r65b2173 rfa4562c  
    561561{
    562562  char buff[LINE], *text;
    563   char *backupfilename="";
     563  char *backupfilename=NULL;
    564564  FILE *file, *backupfile=NULL;
    565565  int size, newline;
     
    650650  char *start, *end;
    651651
    652   start = class;
    653   while(!strncmp(start, "un", 2)) {
    654     start += 2;
    655   }
    656 
    657   start = owl_strdup(start);
     652  while(!strncmp(class, "un", 2)) {
     653    class += 2;
     654  }
     655
     656  start = owl_strdup(class);
    658657  end = start + strlen(start) - 1;
    659658  while(end > start && *end == 'd' && *(end-1) == '.') {
  • variable.c

    rdefe4a3 rfa4562c  
    905905  int i;
    906906  char *ep = "x";
    907   i = strtol(newval, &ep, 10);
     907  i = strtol(newval, (char **)&ep, 10);
    908908  if (*ep || ep==newval) return(-1);
    909909  return (v->set_fn(v, &i));
     
    10151015  int numfailed=0;
    10161016  char buf[1024];
    1017   owl_variable * v;
     1017  void *v;
    10181018
    10191019  in_regtest = 1;
  • zephyr.c

    r712caac rfa4562c  
    12111211
    12121212  /* bail immeaditly if we don't have to do any work */
    1213   ptr=strchr(in, '.');
    1214   if (!strchr(in, '/') && !ptr) {
     1213  ptr=strchr(out, '.');
     1214  if (!strchr(out, '/') && !ptr) {
    12151215    /* no '/' and no '.' */
    12161216    return(out);
    12171217  }
    1218   if (ptr && strchr(in, '@') && (ptr > strchr(in, '@'))) {
     1218  if (ptr && strchr(out, '@') && (ptr > strchr(out, '@'))) {
    12191219    /* There's a '.' but it's in the realm */
    12201220    return(out);
    12211221  }
    1222   if (!strncasecmp(in, OWL_WEBZEPHYR_PRINCIPAL, strlen(OWL_WEBZEPHYR_PRINCIPAL))) {
     1222  if (!strncasecmp(out, OWL_WEBZEPHYR_PRINCIPAL, strlen(OWL_WEBZEPHYR_PRINCIPAL))) {
    12231223    return(out);
    12241224  }
    12251225
    1226   /* remove the realm from ptr, but hold on to it */
     1226  /* remove the realm from out, but hold on to it */
    12271227  realm=strchr(out, '@');
    12281228  if (realm) realm[0]='\0';
Note: See TracChangeset for help on using the changeset viewer.