Commit 310eadb3 authored by Ulrich Sibiller's avatar Ulrich Sibiller Committed by Mike Gabriel

Reconnect.c: reformat saveAgentState()

parent 5c99ec51
...@@ -146,13 +146,12 @@ void setStatePath(char* path) ...@@ -146,13 +146,12 @@ void setStatePath(char* path)
void saveAgentState(char* state) void saveAgentState(char* state)
{ {
FILE* fptr; if (strlen(stateFile))
if(strlen(stateFile))
{ {
fptr=fopen(stateFile, "w"); FILE* fptr = fopen(stateFile, "w");
if(!fptr) if (!fptr)
return; return;
fprintf(fptr,"%s", state); fprintf(fptr, "%s", state);
fclose(fptr); fclose(fptr);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment