pike.git / src / main.c

version» Context lines:

pike.git/src/main.c:141:    }      #ifdef __NT__    if(!*mp) get_master_key(HKEY_CURRENT_USER);    if(!*mp) get_master_key(HKEY_LOCAL_MACHINE);   #endif       if(!*mp && strncmp(DEFAULT_MASTER, "NONE/", 5))    {    char tmp[CONSTANT_STRLEN( DEFAULT_MASTER ) + 10 + 10 + 10]; -  SNPRINTF (tmp, sizeof(tmp)-1, +  snprintf (tmp, sizeof(tmp)-1,    DEFAULT_MASTER,    PIKE_MAJOR_VERSION,    PIKE_MINOR_VERSION,    PIKE_BUILD_VERSION);    set_master( tmp );    }      #ifdef __NT__    if (!(*mp == '/' || *mp == '\\' || (isalpha (*mp) && mp[1] == ':'))) {    char exepath[MAXPATHLEN];    if (!GetModuleFileName (NULL, exepath, _MAX_PATH))    fprintf (stderr, "Failed to get path to exe file: %d\n",    GetLastError());    else {    char tmp[MAXPATHLEN * 2];    char *p = strrchr (exepath, '\\');    if (p) *p = 0; -  SNPRINTF (tmp, sizeof (tmp), "%s/%s", exepath, mp); +  snprintf (tmp, sizeof (tmp), "%s/%s", exepath, mp);    set_master( tmp );    }    }   #else    if (!*mp) {    /* Attempt to find a master via the path to the binary. */    /* Note: We assume that MAXPATHLEN is > 18 characters. */    if (strlen(bin_name) + CONSTANT_STRLEN("master.pike") < MAXPATHLEN) {    char tmp[MAXPATHLEN];    char *p;