From: bfernhomberg Date: Sun, 25 Jan 2004 11:52:14 +0000 (+0000) Subject: fix some 'Bjoern, think before you commit stupid code' issues. X-Git-Tag: netatalk-2-0-alpha2~28 X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=38ae423f3554ac399918639b354e10700abd2728 fix some 'Bjoern, think before you commit stupid code' issues. --- diff --git a/etc/afpd/afp_config.c b/etc/afpd/afp_config.c index 2a2911c3..6d0c7e16 100644 --- a/etc/afpd/afp_config.c +++ b/etc/afpd/afp_config.c @@ -1,5 +1,5 @@ /* - * $Id: afp_config.c,v 1.22.6.3 2004-01-23 14:00:15 bfernhomberg Exp $ + * $Id: afp_config.c,v 1.22.6.4 2004-01-25 11:52:33 bfernhomberg Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * All Rights Reserved. See COPYRIGHT. @@ -389,7 +389,7 @@ static AFPConfig *DSIConfigInit(const struct afp_options *options, /* If specified use the FQDN to register with srvloc, otherwise use IP. */ p = NULL; if (options->fqdn) { - hostname = strdup(options->fqdn); + hostname = options->fqdn; p = strchr(hostname, ':'); } else diff --git a/etc/afpd/afp_options.c b/etc/afpd/afp_options.c index f75085d1..6c13c1de 100644 --- a/etc/afpd/afp_options.c +++ b/etc/afpd/afp_options.c @@ -1,5 +1,5 @@ /* - * $Id: afp_options.c,v 1.30.2.2.2.5 2004-01-24 18:05:26 bfernhomberg Exp $ + * $Id: afp_options.c,v 1.30.2.2.2.6 2004-01-25 11:52:14 bfernhomberg Exp $ * * Copyright (c) 1997 Adrian Sun (asun@zoology.washington.edu) * Copyright (c) 1990,1993 Regents of The University of Michigan. @@ -481,8 +481,8 @@ int afp_options_parseline(char *buf, struct afp_options *options) LOG(log_warning, logtype_afpd, "setting Unix codepage to '%s' failed", c); } else { - if (opt = strdup(c)) - options->unixcodepage = strdup(c); + if ((opt = strdup(c))) + options->unixcodepage = opt; } } @@ -492,8 +492,8 @@ int afp_options_parseline(char *buf, struct afp_options *options) LOG(log_warning, logtype_afpd, "setting Mac codepage to '%s' failed", c); } else { - if (opt = strdup(c)) - options->maccodepage = strdup(c); + if ((opt = strdup(c))) + options->maccodepage = opt; } }