Ignore:
Timestamp:
2004-05-24T15:34:40+12:00 (20 years ago)
Author:
mdewsnip
Message:

(Human Info) Now delete all char* variables from text_t.getcstr() function with delete[] variable, and all "" are now g_EmptyText (const text_t("")).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gsdl/src/recpt/userdb.cpp

    r2750 r7381  
    4848  text_t crypt_password;
    4949
    50   if (text.empty()) return "";
     50  if (text.empty()) return g_EmptyText;
    5151
    5252  // encrypt the password
    5353  char *text_cstr = text.getcstr();
    54   if (text_cstr == NULL) return "";
     54  if (text_cstr == NULL) return g_EmptyText;
    5555  crypt_password = crypt(text_cstr, salt);
    56   delete text_cstr;
     56  delete []text_cstr;
    5757
    5858  return crypt_password;
     
    236236text_t format_user_groups(const text_t user_groups){
    237237
    238   text_t new_groups = "";
     238  text_t new_groups = g_EmptyText;
    239239  text_t::const_iterator here = user_groups.begin();
    240240  text_t::const_iterator end = user_groups.end();
     
    287287text_t generate_key (const text_t &keydbfile, const text_t &username) {
    288288  gdbmclass keydb;
    289   if (!keydb.opendatabase(keydbfile, GDBM_WRCREAT, 1000, true)) return "";
     289  if (!keydb.opendatabase(keydbfile, GDBM_WRCREAT, 1000, true)) return g_EmptyText;
    290290
    291291  text_t key = generate_key (keydb, username);
Note: See TracChangeset for help on using the changeset viewer.