~ubuntu-branches/debian/squeeze/ntp/squeeze

« back to all changes in this revision

Viewing changes to libntp/audio.c

  • Committer: Bazaar Package Importer
  • Author(s): Kurt Roeckx
  • Date: 2010-05-24 11:09:51 UTC
  • mfrom: (1.2.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100524110951-1o7gh469ygochf4n
Tags: 1:4.2.6.p1+dfsg-1
* New upstream version
  - They no longer ship arlib, adjust dfsg.patch.
  - Drop kfreebsd.patch, applied upstream
  - Update patches for upstream changes.
* Remove the obsolete config files:

  for ntp:
  - /etc/logcheck/ignore.d.server/ntp, removed in 1:4.2.6+dfsg-1
  - /etc/dhcp3/dhclient-enter-hooks.d/ntp, replaced by exit hooks in
    1:4.2.4p4+dfsg-3
  - /etc/network/if-up.d/ntp, removed in 1:4.2.4p0+dfsg-1

  for ntpdate:
  - /etc/dhcp3/dhclient-enter-hooks.d/ntpdate, replaced by exit hooks in
    1:4.2.4p4+dfsg-3

  Use dpkg 1.15.7.2's dpkg-maintscript-helper.  This needs
  a Pre-Depends to work, else it's never going to be removed.
  (Closes: #569530)
* Add "Depends: ${misc:Depends}" to ntp-doc.

Show diffs side-by-side

added added

removed removed

Lines of Context:
121
121
        FILE *fd;
122
122
        char device[20], line[100], ab[100];
123
123
 
124
 
        sprintf(device, "%s%d", INIT_FILE, unit);
 
124
        snprintf(device, sizeof(device), "%s%d", INIT_FILE, unit);
125
125
        if ((fd = fopen(device, "r")) == NULL) {
126
126
                printf("audio_config_read: <%s> NO\n", device);
127
 
                sprintf(device, "%s.%d", INIT_FILE, unit);
 
127
                snprintf(device, sizeof(device), "%s.%d", INIT_FILE,
 
128
                         unit);
128
129
                if ((fd = fopen(device, "r")) == NULL) {
129
130
                        printf("audio_config_read: <%s> NO\n", device);
130
 
                        sprintf(device, "%s.%d", INIT_FILE, unit);
 
131
                        snprintf(device, sizeof(device), "%s",
 
132
                                 INIT_FILE);
131
133
                        if ((fd = fopen(device, "r")) == NULL) {
132
 
                                printf("audio_config_read: <%s> NO\n", device);
 
134
                                printf("audio_config_read: <%s> NO\n",
 
135
                                       device);
133
136
                                return;
134
137
                        }
135
138
                }
233
236
                ;
234
237
 
235
238
#ifdef PCM_STYLE_SOUND
236
 
        (void)sprintf(actl_dev, ACTL_DEV, unit);
 
239
        snprintf(actl_dev, sizeof(actl_dev), ACTL_DEV, unit);
237
240
 
238
241
        audio_config_read(unit, &actl, &dname);
239
242
        /* If we have values for cf_c_dev or cf_i_dev, use them. */