~ubuntu-branches/ubuntu/trusty/eglibc/trusty

« back to all changes in this revision

Viewing changes to timezone/scheck.c

  • Committer: Package Import Robot
  • Author(s): Adam Conrad
  • Date: 2013-01-10 18:39:35 UTC
  • mfrom: (1.5.2) (4.4.24 experimental)
  • Revision ID: package-import@ubuntu.com-20130110183935-afsgfxkmg7wk5eaj
Tags: 2.17-0ubuntu1
* Merge with Debian, bringing in a new upstream and many small fixes:
  - patches/any/cvs-malloc-deadlock.diff: Dropped, merged upstream.
  - patches/ubuntu/lddebug-scopes.diff: Rebase for upstream changes.
  - patches/ubuntu/local-CVE-2012-3406.diff: Rebased against upstream.
  - patches/ubuntu/no-asm-mtune-i686.diff: Fixed in recent binutils.
* This upstream merge fixes a nasty hang in pulseaudio (LP: #1085342)
* Bump MIN_KERNEL_SUPPORTED to 2.6.32 on ARM, now that we no longer
  have to support shonky 2.6.31 kernels on imx51 babbage builders.
* Drop patches/ubuntu/local-disable-nscd-host-caching.diff, as these
  issues were apparently resolved upstream a while ago (LP: #613662)
* Fix the compiled-in bug URL to point to launchpad.net, not Debian.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
** 2006-07-17 by Arthur David Olson.
4
4
*/
5
5
 
6
 
#ifndef lint
7
 
#ifndef NOID
8
 
static char     elsieid[] = "@(#)scheck.c       8.19";
9
 
#endif /* !defined lint */
10
 
#endif /* !defined NOID */
11
 
 
12
6
/*LINTLIBRARY*/
13
7
 
14
8
#include "private.h"
15
9
 
16
10
const char *
17
 
scheck(string, format)
18
 
const char * const      string;
19
 
const char * const      format;
 
11
scheck(const char *const string, const char *const format)
20
12
{
21
13
        register char *         fbuf;
22
14
        register const char *   fp;
28
20
        result = "";
29
21
        if (string == NULL || format == NULL)
30
22
                return result;
31
 
        fbuf = imalloc((int) (2 * strlen(format) + 4));
 
23
        fbuf = malloc(2 * strlen(format) + 4);
32
24
        if (fbuf == NULL)
33
25
                return result;
34
26
        fp = format;
57
49
        *tp++ = 'c';
58
50
        *tp = '\0';
59
51
        if (sscanf(string, fbuf, &dummy) != 1)
60
 
                result = (char *) format;
61
 
        ifree(fbuf);
 
52
                result = format;
 
53
        free(fbuf);
62
54
        return result;
63
55
}