pike.git / src / builtin_functions.c

version» Context lines:

pike.git/src/builtin_functions.c:3273: Inside #if defined(HAVE_CRYPT)
   }   #ifdef HAVE_CRYPT    ret = (char *)crypt(pwd, saltp);   #else   #ifdef HAVE__CRYPT    ret = (char *)_crypt(pwd, saltp);   #else   #error No crypt function found and fallback failed.   #endif   #endif +  if(args < 2) +  {    if (!ret) {    switch(errno) {   #ifdef ELIBACC    case ELIBACC:    Pike_error("Failed to load a required shared library. "    "Unsupported salt.\n");    break;   #endif    case ENOMEM:    Pike_error("Out of memory.\n");    break;    case EINVAL:    default:    Pike_error("Unsupported salt (%d).\n", errno);    break;    }    } -  if(args < 2) -  { +     pop_n_elems(args);    push_text(ret);    }else{    int i; -  i=!strcmp(ret,saltp); +  i = ret && !strcmp(ret,saltp);    pop_n_elems(args);    push_int(i);    }   }      /*! @decl void destruct(void|object o)    *!    *! Mark an object as destructed.    *!    *! Calls @expr{o->destroy()@}, and then clears all variables in the