diff options
Diffstat (limited to 'nx-X11/programs/Xserver')
-rw-r--r-- | nx-X11/programs/Xserver/hw/nxagent/Reconnect.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c index 9858924d3..93e9ab432 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Reconnect.c @@ -146,13 +146,12 @@ void setStatePath(char* path) void saveAgentState(char* state) { - FILE* fptr; - if(strlen(stateFile)) + if (strlen(stateFile)) { - fptr=fopen(stateFile, "w"); - if(!fptr) + FILE* fptr = fopen(stateFile, "w"); + if (!fptr) return; - fprintf(fptr,"%s", state); + fprintf(fptr, "%s", state); fclose(fptr); } } |