Displaying 1 result from an estimated 1 matches for "path_var_run".
2011 Jan 19
1
[nut-commits] svn commit r2845 - branches/windows_port/common
...d)
> {
> - const char * path;
> -
> - if ((path = getenv("NUT_STATEPATH")) == NULL) {
> #ifndef WIN32
> - path = STATEPATH;
> + const char *path = getenv("NUT_STATEPATH");
> #else
> - if( relative_state_path == NULL ) {
> - path = getfullpath(PATH_VAR_RUN);
> - if( path == NULL ) {
> - path = STATEPATH;
> - }
> - }
> - else {
> - path = relative_state_path;
> - }
> + static const char *path = getfullpath(PATH_VAR_RUN);
> #endif
> - }
> -
> - return path;
> + return (path != NULL) ? path : STATEPATH...