Thanks, Julien.

> I guess you'll tell me you don't put spaces between "if" and "(", and I
> should use consistent style.

I can easily edit that myself.

> case 'g':

This case is very similar to 'G' below.  Please refactor to share the two
cases (with an if inside).

> +                strncpy(local_server_path, optarg, 
> sizeof(local_server_path));

Plase make local_server_path a pointer, and either keep a pointer to the
argv element, or strdup it if you're paranoid.  See below why.

> +        else if(strcmp(token, "local-path") == 0) {
> +            if (strlen(file) >= sizeof(local_server_path))
> +                goto error;
> +            local_server_port = -1;
> +            strncpy(local_server_path, file, sizeof(local_server_path));
> +            local_server_write = 0;

Memory leak.  File is dynamically allocated, so you need to free it at
some point.  If you just make local_server_path a pointer, no need to
copy, just keep a reference to it.

-- Juliusz

_______________________________________________
Babel-users mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/babel-users

Reply via email to