소스 검색

Inline rerr() into its only current call site

Guillem Jover 15 년 전
부모
커밋
79a67e901e
3개의 변경된 파일4개의 추가작업 그리고 6개의 파일을 삭제
  1. 0 1
      dpkg-split/dpkg-split.h
  2. 4 1
      dpkg-split/info.c
  3. 0 4
      dpkg-split/main.c

+ 0 - 1
dpkg-split/dpkg-split.h

@@ -58,7 +58,6 @@ extern const char *opt_outputfile;
 extern int opt_npquiet;
 extern int opt_msdos;
 
-void rerr(const char *fn) DPKG_ATTR_NORET;
 void rerreof(FILE *f, const char *fn) DPKG_ATTR_NORET;
 void print_info(const struct partinfo *pi);
 struct partinfo *read_info(FILE *partfile, const char *fn, struct partinfo *ir);

+ 4 - 1
dpkg-split/info.c

@@ -81,7 +81,10 @@ struct partinfo *read_info(FILE *partfile, const char *fn, struct partinfo *ir)
   struct stat stab;
 
   if (fread(magicbuf, 1, sizeof(magicbuf), partfile) != sizeof(magicbuf)) {
-    if (ferror(partfile)) rerr(fn); else return NULL;
+    if (ferror(partfile))
+      ohshite(_("error reading %.250s"), fn);
+    else
+      return NULL;
   }
   if (memcmp(magicbuf, DPKG_AR_MAGIC, sizeof(magicbuf)))
     return NULL;

+ 0 - 4
dpkg-split/main.c

@@ -104,10 +104,6 @@ const char *opt_outputfile = NULL;
 int opt_npquiet = 0;
 int opt_msdos = 0;
 
-void rerr(const char *fn) {
-  ohshite(_("error reading %.250s"), fn);
-}
-
 void rerreof(FILE *f, const char *fn) {
   if (ferror(f)) ohshite(_("error reading %.250s"),fn);
   ohshit(_("unexpected end of file in %.250s"),fn);