Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Jun 2005 02:51:01 GMT
From:      Vlad Skvortsov <vss@high.net.ru>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   docs/82508: misleading man page for basename/dirname
Message-ID:  <200506220251.j5M2p1UX022891@www.freebsd.org>
Resent-Message-ID: <200506220300.j5M30eug043970@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         82508
>Category:       docs
>Synopsis:       misleading man page for basename/dirname
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jun 22 03:00:39 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Vlad Skvortsov
>Release:        5.2.1
>Organization:
Netli, Inc.
>Environment:
FreeBSD vlad.hq.netli.lan 5.2.1-RELEASE FreeBSD 5.2.1-RELEASE #0: Sat May 22 11:32:00 PDT 2004     root@vlad.hq.netli.lan:/usr/obj/usr/src/sys/VLAD  i386
>Description:
The man pages for both basename(3) and dirname(3) state that the functions return pointers to the internal _static_ storage. However, those functions actually perform malloc() call to allocate storage on the first invocation. Thus, the memory pointer returned is actually a pointer to internal but dynamically allocated storage.

I don't know whether this violates standard or not, but the documentation is misleading.
>How-To-Repeat:
      Not applicable.
>Fix:
      Fix the docs.
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200506220251.j5M2p1UX022891>