Browse Source

Rename internal variable.

Some very old and broken compilers complain about shadowing bcopy().
Georgi Chorbadzhiyski 9 years ago
parent
commit
97988a6a9f
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      cmd.c

+ 3
- 3
cmd.c View File

285
 		return parse_command(data, cmd_buffer);
285
 		return parse_command(data, cmd_buffer);
286
 	// Split commands and parse them one by one
286
 	// Split commands and parse them one by one
287
 	int ok_commands = 0;
287
 	int ok_commands = 0;
288
-	char *bcopy = xstrdup(cmd_buffer);
289
-	char *newcmd, *cmd = bcopy;
288
+	char *buf_copy = xstrdup(cmd_buffer);
289
+	char *newcmd, *cmd = buf_copy;
290
 	while(1) {
290
 	while(1) {
291
 		newcmd = strstr(cmd, "\n\n"); // Find next command
291
 		newcmd = strstr(cmd, "\n\n"); // Find next command
292
 		if (!newcmd) {
292
 		if (!newcmd) {
299
 			ok_commands++;
299
 			ok_commands++;
300
 		cmd = newcmd + 2; // Advance cmd to the next command
300
 		cmd = newcmd + 2; // Advance cmd to the next command
301
 	}
301
 	}
302
-	free(bcopy);
302
+	free(buf_copy);
303
 	return ok_commands;
303
 	return ok_commands;
304
 }
304
 }
305
 
305
 

Loading…
Cancel
Save