-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
* GPL HEADER START
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
NI_NAMEREQD | NI_NOFQDN) == 0) {
if ((p = strchr(name, '.')))
*p = '\0';
- len = strlen(name) + strlen(lnet) + 2;
+ len = strlen(name) + 2;
+ if (lnet)
+ len += strlen(lnet);
if (!(res = malloc(len)))
nl_oom();
snprintf(res, len, "%s@%s", name, lnet);