pos = buffer;
while (*pos != 0) {
- if (*pos == ' ') {
- pos++;
+ if (*(pos++) == ' ') {
if(strncmp("200", pos, 3)) {
fprintf(stderr, "Wrong result-code: %s\n", buffer);
return -1;
break;
}
}
- pos++;
+
+ if (*(++pos) == 0) {
+ fprintf(stderr, "Wrong answer from server: %s\n", buffer);
+ return -1;
+ }
}
}