]> granicus.if.org Git - sudo/commitdiff
Fix C format warnings.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 19 May 2011 20:21:59 +0000 (16:21 -0400)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 19 May 2011 20:21:59 +0000 (16:21 -0400)
plugins/sudoers/sudoreplay.c

index ab8ee8d4c969acb9b8a237d733bddab6f95407a5..c33a1c764d5ed2044428d5f116ba3c170118154d 100644 (file)
@@ -311,7 +311,7 @@ main(int argc, char *argv[])
        plen = snprintf(path, sizeof(path), "%s/%.2s/%.2s/%.2s/timing",
            session_dir, id, &id[2], &id[4]);
        if (plen <= 0 || plen >= sizeof(path))
-           errorx(1, _("%s/%.2s/%.2s/%.2s/%.2s/timing: %s"), session_dir,
+           errorx(1, _("%s/%.2s/%.2s/%.2s/timing: %s"), session_dir,
                id, &id[2], &id[4], strerror(ENAMETOOLONG));
     } else {
        plen = snprintf(path, sizeof(path), "%s/%s/timing",
@@ -456,8 +456,10 @@ delay(double secs)
       memcpy(&ts, &rts, sizeof(ts));
       rval = nanosleep(&ts, &rts);
     } while (rval == -1 && errno == EINTR);
-    if (rval == -1)
-       error(1, _("nanosleep: tv_sec %ld, tv_nsec %ld"), ts.tv_sec, ts.tv_nsec);
+    if (rval == -1) {
+       error(1, _("nanosleep: tv_sec %ld, tv_nsec %ld"),
+           (long)ts.tv_sec, (long)ts.tv_nsec);
+    }
 }
 
 static void *